summaryrefslogtreecommitdiff
path: root/src/sysdeps/trypipe2.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-15 15:04:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-15 15:04:25 +0000
commit21bf9df13cad0da20ecd9fadfa54cd16479238aa (patch)
tree463a70a01e82f731fa31d60023778d078a0d7269 /src/sysdeps/trypipe2.c
parent6d2c28acaa0c11841ca57ffe2b07e34c91cdea9e (diff)
downloadskalibs-21bf9df13cad0da20ecd9fadfa54cd16479238aa.tar.xz
Better pipe2 detection on BSD systems
Diffstat (limited to 'src/sysdeps/trypipe2.c')
-rw-r--r--src/sysdeps/trypipe2.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/sysdeps/trypipe2.c b/src/sysdeps/trypipe2.c
index 4e63182..0b8cb3c 100644
--- a/src/sysdeps/trypipe2.c
+++ b/src/sysdeps/trypipe2.c
@@ -1,11 +1,23 @@
/* ISC license. */
-#ifndef _NETBSD_SOURCE
-#define _NETBSD_SOURCE
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE
+#endif
+#ifndef _INCOMPLETE_XOPEN_C063
+#define _INCOMPLETE_XOPEN_C063
+#endif
#include <unistd.h>