chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b986229
)
build-sys: fix build on compilers without static_assert
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 23 Jan 2015 14:06:00 +0000
(09:06 -0500)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 23 Jan 2015 14:30:44 +0000
(09:30 -0500)
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
src/shared/macro.h
patch
|
blob
|
history
diff --git
a/src/shared/macro.h
b/src/shared/macro.h
index 96d96f962116d0fdcce5c264a57e1c874c0d5fbe..ae2971fad141f54959bc89d0e50675f5faa2497a 100644
(file)
--- a/
src/shared/macro.h
+++ b/
src/shared/macro.h
@@
-238,7
+238,7
@@
static inline unsigned long ALIGN_POWER2(unsigned long u) {
#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