diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-04-16 12:57:52 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2024-04-16 12:57:52 +0000 |
commit | 825b80eaa311b0aec4c00614f38f3eb63949d5a7 (patch) | |
tree | 624f702487d9acdd3cc85060cfe2edc388cf7096 /src/libunixonacid/open3_at.c | |
parent | bfc53cfde4fdda343647678fcd21b38a44f2de08 (diff) | |
download | skalibs-825b80eaa311b0aec4c00614f38f3eb63949d5a7.tar.xz |
Tentative support for old MacOS with no O_CLOEXEC
Also add a prototype for gol, not finished yet.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libunixonacid/open3_at.c')
-rw-r--r-- | src/libunixonacid/open3_at.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libunixonacid/open3_at.c b/src/libunixonacid/open3_at.c index 063092d..742a579 100644 --- a/src/libunixonacid/open3_at.c +++ b/src/libunixonacid/open3_at.c @@ -11,14 +11,14 @@ #include <skalibs/nonposix.h> #include <errno.h> -#include <fcntl.h> +#include <skalibs/fcntl.h> #include <skalibs/unix-transactional.h> int open3_at (int dirfd, char const *file, int flags, unsigned int mode) { int fd ; - do fd = openat(dirfd, file, flags, mode) ; + do fd = openat(dirfd, file, flags, mode) ; /* all systems that support openat() have O_CLOEXEC */ while (fd == -1 && errno == EINTR) ; return fd ; } @@ -26,8 +26,9 @@ int open3_at (int dirfd, char const *file, int flags, unsigned int mode) #else #include <sys/stat.h> -#include <fcntl.h> #include <errno.h> + +#include <skalibs/fcntl.h> #include <skalibs/djbunix.h> #include <skalibs/unix-transactional.h> |