build-sys: fix build on compilers without static_assert

Build would fail when assert was used on the same line in
different files #included together.

https://bugs.freedesktop.org/show_bug.cgi?id=87339

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-01-23 09:06:00 -05:00 committed by Anthony G. Basile
parent 5fc65c174b
commit c7badd37d3

View File

@ -119,7 +119,7 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
#else
#define assert_cc(expr) \
DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \
struct CONCATENATE(_assert_struct_, __LINE__) { \
struct CONCATENATE(_assert_struct_, __COUNTER__) { \
char x[(expr) ? 0 : -1]; \
}; \
REENABLE_WARNING