diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-04-16 13:57:35 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2024-04-16 13:57:35 +0000 |
commit | 8ee2aea6d46215dcfda5cc73a5762800099e9fb1 (patch) | |
tree | e5f04f6893ba62982131a9f94c14e441d6fa31c8 /src/sysdeps/tryfdopendir.c | |
parent | 47f08d628d75469e2c62901f7b81fe3bf0787b0f (diff) | |
download | skalibs-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.c | 22 |
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 ; +} |