aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util-src/net.c3
-rw-r--r--util-src/pposix.c6
-rw-r--r--util-src/signal.c2
3 files changed, 11 insertions, 0 deletions
diff --git a/util-src/net.c b/util-src/net.c
index 9ff01a71..5f706d81 100644
--- a/util-src/net.c
+++ b/util-src/net.c
@@ -9,7 +9,10 @@
--
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
+
#include <stddef.h>
#include <string.h>
#include <errno.h>
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 215c45c3..656bda07 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -17,11 +17,17 @@
#if defined(__linux__)
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#else
+#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif
+#endif
+#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
+#endif
#include <stdlib.h>
#include <math.h>
diff --git a/util-src/signal.c b/util-src/signal.c
index 9e6f6f63..9bbdb37e 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -26,7 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <signal.h>
#include <stdlib.h>