summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritchyny <itchyny@cybozu.co.jp>2023-06-27 07:25:55 +0900
committerGitHub <noreply@github.com>2023-06-27 07:25:55 +0900
commite468eaa39659640db15c60e48c0a0e85e4ca1a84 (patch)
treefc88df8856a001408b6a6cfd8cb824e96b1f6ca8
parent44c89ad3da8e3f7ce4864c5ac79c78c88a243ca3 (diff)
Fix glibc warning about _BSD_SOURCE and redefined _GNU_SOURCE (fix #1978) (#2631)
-rw-r--r--src/builtin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/builtin.c b/src/builtin.c
index 649dec3a..9b2d9a23 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -1,5 +1,6 @@
-#define _BSD_SOURCE
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
#ifndef __sun__
# define _XOPEN_SOURCE
# define _XOPEN_SOURCE_EXTENDED 1