dhcp: avoid compilation error in macro.h due to undefined __STDC_VERSION__ variable for -std=gnu99

systemd compiles with -std=gnu99, while we compile our sources with
-std=gnu89. Hence __STDC_VERSION__ is not defined.

As we define -std=gnu98 as CFLAGS with --enable-more-warnings, we cannot
overwrite it via libsystemd_dhcp_la_CFLAGS because the (user provided)
CFLAGS takes precedence.
This commit is contained in:
Thomas Haller 2015-02-02 10:27:09 +01:00
parent 2dcb097e99
commit 1391bdfa61

View file

@ -432,7 +432,7 @@ do { \
* Don't break on glibc < 2.16 that doesn't define __STDC_NO_THREADS__
* see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769
*/
#if __STDC_VERSION__ >= 201112L && !(defined(__STDC_NO_THREADS__) || (defined(__GNU_LIBRARY__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 16))
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !(defined(__STDC_NO_THREADS__) || (defined(__GNU_LIBRARY__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 16))
#define thread_local _Thread_local
#else
#define thread_local __thread