0010-Fix-build-when-using-C99-and-C-11.patch 925 B

123456789101112131415161718192021222324252627282930
  1. From 55e3ac26c1238df4c85877c32763a02c00da1345 Mon Sep 17 00:00:00 2001
  2. From: Thomas Guillem <thomas@gllm.fr>
  3. Date: Thu, 30 Apr 2015 13:29:50 +0200
  4. Subject: [PATCH] Fix build when using C99 and C++11
  5. Fix build when using C99 and C++11
  6. Indeed, C99 doesn't have static_assert and C++11 has it.
  7. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  8. ---
  9. include/vlc_fixups.h | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
  12. index 997f600d6a..0d4fcd0c8d 100644
  13. --- a/include/vlc_fixups.h
  14. +++ b/include/vlc_fixups.h
  15. @@ -239,7 +239,7 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
  16. }
  17. #endif
  18. -#if !defined (HAVE_STATIC_ASSERT)
  19. +#if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
  20. # define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
  21. # define static_assert _Static_assert
  22. #endif
  23. --
  24. 2.14.3