Ticket #47313: static_assert.patch

File static_assert.patch, 619 bytes (added by RJVB (René Bertin), 10 years ago)
  • include/vlc_fixups.h

    diff --git include/vlc_fixups.h include/vlc_fixups.h
    index ee168d7..ca5d714 100644
    static inline locale_t newlocale(int mask, const char * locale, locale_t base) 
    239239}
    240240#endif
    241241
    242 #if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
    243 # define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
     242#if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert) && !defined (static_assert)
     243# define _Static_assert(x, s) ((void) sizeof (struct { unsigned a[(x) ? 1 : -1];}))
    244244# define static_assert _Static_assert
    245245#endif
    246246