summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-23 09:06:00 -0500
committerAnthony G. Basile <blueness@gentoo.org>2015-01-25 17:26:23 -0500
commitc7badd37d3ac5b06b1fb170b7dfc8ed7c00ce64b (patch)
tree1c2037c12de6f4a7a193739ed81a9c2ade9885c1
parent5fc65c174b6137f46eea9ed541bc48526797ef84 (diff)
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>
-rw-r--r--src/shared/macro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h
index 6aa6d98913..fcc988a2b5 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -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