summaryrefslogtreecommitdiff
path: root/src/sysdeps/tryfdopendir.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-04-16 13:57:35 +0000
committerLaurent Bercot <ska@appnovation.com>2024-04-16 13:57:35 +0000
commit8ee2aea6d46215dcfda5cc73a5762800099e9fb1 (patch)
treee5f04f6893ba62982131a9f94c14e441d6fa31c8 /src/sysdeps/tryfdopendir.c
parent47f08d628d75469e2c62901f7b81fe3bf0787b0f (diff)
downloadskalibs-8ee2aea6d46215dcfda5cc73a5762800099e9fb1.tar.xz
More support for old MacOS fossils
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/sysdeps/tryfdopendir.c')
-rw-r--r--src/sysdeps/tryfdopendir.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sysdeps/tryfdopendir.c b/src/sysdeps/tryfdopendir.c
new file mode 100644
index 0000000..d9a8f01
--- /dev/null
+++ b/src/sysdeps/tryfdopendir.c
@@ -0,0 +1,22 @@
+/* ISC license. */
+
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
+#endif
+
+#include <dirent.h>
+
+int main (void)
+{
+ DIR *dir = fdopendir(0) ;
+ return !dir ;
+}