summaryrefslogtreecommitdiff
path: root/util/kconfig
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-03-01 15:41:55 +0100
committerNico Huber <nico.h@gmx.de>2020-03-08 14:24:03 +0000
commitb3bfb2a1a7ffc190dc37905b073da8d1d3b054ba (patch)
tree7c70fefc5d1de06b3652c30968085ae16ce846d6 /util/kconfig
parentac7d6b409e117bb7559d01e5a57e634712503fe5 (diff)
util/kconfig: Silence warning about _GNU_SOURCE
For some reason, this symbol gets redefined, which causes a warning. Hide the warning by checking whether it is already defined. Change-Id: I70ffc9a799e0b536d6aba7d00f828bd6d915d94c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39183 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/kconfig')
-rw-r--r--util/kconfig/nconf.c2
-rw-r--r--util/kconfig/regex.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/util/kconfig/nconf.c b/util/kconfig/nconf.c
index 905dcd11bd..42ea494f6b 100644
--- a/util/kconfig/nconf.c
+++ b/util/kconfig/nconf.c
@@ -5,7 +5,9 @@
* Derived from menuconfig.
*
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <string.h>
#include <stdlib.h>
diff --git a/util/kconfig/regex.c b/util/kconfig/regex.c
index a6d947fbd0..d0e1d7b2f5 100644
--- a/util/kconfig/regex.c
+++ b/util/kconfig/regex.c
@@ -24,7 +24,9 @@
#pragma alloca
#endif
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
/* We need this for `regex.h', and perhaps for the Emacs include files. */
#include <sys/types.h>