[vlc-commits] Fix build when using C99 and C++11

Thomas Guillem git at videolan.org
Thu Apr 30 15:32:21 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr 30 15:29:50 2015 +0200| [51ce6cdaf598754e617900994c1943c6cba6d604] | committer: Thomas Guillem

Fix build when using C99 and C++11

Indeed, C99 doesn't have static_assert and C++11 has it.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=51ce6cdaf598754e617900994c1943c6cba6d604
---

 include/vlc_fixups.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index b949d24..ee168d7 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -239,7 +239,7 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
 }
 #endif
 
-#if !defined (HAVE_STATIC_ASSERT)
+#if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
 # define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
 # define static_assert _Static_assert
 #endif



More information about the vlc-commits mailing list