logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0005-libavutil-Use-C11-_Alignas-as-fallback-for-DECLARE_A.patch (1053B)


  1. From 4e0c099e66f1e3216b2498eb9c87c12c9034d6a2 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Mon, 25 Oct 2021 17:08:29 -0700
  4. Subject: [PATCH] libavutil: Use C11 _Alignas as fallback for DECLARE_ALIGNED
  5. ---
  6. libavutil/mem_internal.h | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h
  9. index 20f9b3e3f2..a73dfd581b 100644
  10. --- a/libavutil/mem_internal.h
  11. +++ b/libavutil/mem_internal.h
  12. @@ -89,6 +89,10 @@
  13. #define DECLARE_ALIGNED_T(n,t,v) __declspec(align(n)) t v
  14. #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
  15. #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
  16. +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
  17. + #define DECLARE_ALIGNED(n,t,v) _Alignas(n) t v
  18. + #define DECLARE_ASM_ALIGNED(n,t,v) _Alignas(n) t v
  19. + #define DECLARE_ASM_CONST(n,t,v) static const _Alignas(n) t v
  20. #else
  21. #define DECLARE_ALIGNED_T(n,t,v) t v
  22. #define DECLARE_ASM_ALIGNED(n,t,v) t v
  23. --
  24. 2.44.0