summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/comm-i2c.c2
-rw-r--r--util/uut/opr.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/util/comm-i2c.c b/util/comm-i2c.c
index 83e0b1dcf7..d76749fbe5 100644
--- a/util/comm-i2c.c
+++ b/util/comm-i2c.c
@@ -3,7 +3,9 @@
* found in the LICENSE file.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* for asprintf */
+#endif
#include <errno.h>
#include <fcntl.h>
diff --git a/util/uut/opr.c b/util/uut/opr.c
index 2b53cafd54..2105a199a1 100644
--- a/util/uut/opr.c
+++ b/util/uut/opr.c
@@ -5,7 +5,11 @@
*/
/* This file implements the UART console application operations. */
-#define _GNU_SOURCE
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* for asprintf */
+#endif
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>