From 1391bdfa61ac16cda0d2de3db7cc29b5c03f1cdf Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 2 Feb 2015 10:27:09 +0100 Subject: [PATCH] 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. --- src/dhcp-manager/systemd-dhcp/src/shared/macro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/macro.h b/src/dhcp-manager/systemd-dhcp/src/shared/macro.h index c65a0bac41..d5cb240b3b 100644 --- a/src/dhcp-manager/systemd-dhcp/src/shared/macro.h +++ b/src/dhcp-manager/systemd-dhcp/src/shared/macro.h @@ -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