about summary refs log tree commit diff
path: root/src/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdeps')
-rw-r--r--src/sysdeps/tryarc4random.c16
-rw-r--r--src/sysdeps/tryarc4random_addrandom.c16
-rw-r--r--src/sysdeps/trygetpeereid.c20
-rw-r--r--src/sysdeps/trymemmem.c28
-rw-r--r--src/sysdeps/trynamespaces.c15
-rw-r--r--src/sysdeps/trystrcasestr.c6
-rw-r--r--src/sysdeps/trystrnlen.c3
7 files changed, 102 insertions, 2 deletions
diff --git a/src/sysdeps/tryarc4random.c b/src/sysdeps/tryarc4random.c
index b2f596a..3593eaa 100644
--- a/src/sysdeps/tryarc4random.c
+++ b/src/sysdeps/tryarc4random.c
@@ -3,6 +3,22 @@
 #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 <stdlib.h>
 
 int main (void)
diff --git a/src/sysdeps/tryarc4random_addrandom.c b/src/sysdeps/tryarc4random_addrandom.c
index 1d5f84f..beb2346 100644
--- a/src/sysdeps/tryarc4random_addrandom.c
+++ b/src/sysdeps/tryarc4random_addrandom.c
@@ -3,6 +3,22 @@
 #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 <stdlib.h>
 
 int main (void)
diff --git a/src/sysdeps/trygetpeereid.c b/src/sysdeps/trygetpeereid.c
index 10a411a..87b5017 100644
--- a/src/sysdeps/trygetpeereid.c
+++ b/src/sysdeps/trygetpeereid.c
@@ -3,6 +3,22 @@
 #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 <sys/types.h>
 #include <unistd.h>
 
@@ -10,6 +26,6 @@ int main (void)
 {
   uid_t uid ;
   gid_t gid ;
-  int s = 0 ;
-  return getpeereid(s, &uid, &gid) ;
+  int fd = 0 ;
+  return getpeereid(fd, &uid, &gid) ;
 }
diff --git a/src/sysdeps/trymemmem.c b/src/sysdeps/trymemmem.c
new file mode 100644
index 0000000..458ac25
--- /dev/null
+++ b/src/sysdeps/trymemmem.c
@@ -0,0 +1,28 @@
+/* ISC license. */
+
+#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 <string.h>
+
+int main (void)
+{
+  memmem("blah", 4, "la", 2) ;
+  return 0 ;
+}
diff --git a/src/sysdeps/trynamespaces.c b/src/sysdeps/trynamespaces.c
index 01894be..b88f414 100644
--- a/src/sysdeps/trynamespaces.c
+++ b/src/sysdeps/trynamespaces.c
@@ -1,8 +1,23 @@
 /* ISC license. */
 
+#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 <sched.h>
 
diff --git a/src/sysdeps/trystrcasestr.c b/src/sysdeps/trystrcasestr.c
index f362202..3c4efc4 100644
--- a/src/sysdeps/trystrcasestr.c
+++ b/src/sysdeps/trystrcasestr.c
@@ -3,6 +3,9 @@
 #undef _POSIX_C_SOURCE
 #undef _XOPEN_SOURCE
 
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
+#endif
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
@@ -12,6 +15,9 @@
 #ifndef _NETBSD_SOURCE
 #define _NETBSD_SOURCE
 #endif
+#ifndef _INCOMPLETE_XOPEN_C063
+#define _INCOMPLETE_XOPEN_C063
+#endif
 
 #include <string.h>
 
diff --git a/src/sysdeps/trystrnlen.c b/src/sysdeps/trystrnlen.c
index 7ebab53..0799dde 100644
--- a/src/sysdeps/trystrnlen.c
+++ b/src/sysdeps/trystrnlen.c
@@ -1,5 +1,8 @@
 /* ISC license. */
 
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+
 #include <string.h>
 
 int main (void)