diff options
Diffstat (limited to 'src/libunixonacid/opendir_at.c')
-rw-r--r-- | src/libunixonacid/opendir_at.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libunixonacid/opendir_at.c b/src/libunixonacid/opendir_at.c index bee971f..c1de4f1 100644 --- a/src/libunixonacid/opendir_at.c +++ b/src/libunixonacid/opendir_at.c @@ -1,5 +1,9 @@ /* ISC license. */ +/* Should not be necessary but old NetBSD/OpenBSD fail to + properly expose fdopendir() otherwise */ +#include <skalibs/nonposix.h> + #include <skalibs/direntry.h> #include <skalibs/djbunix.h> #include <skalibs/unix-transactional.h> @@ -7,7 +11,7 @@ DIR *opendir_at (int dfd, char const *name) { DIR *dir ; - int fd = open_readatb(dfd, name) ; + int fd = openc_readatb(dfd, name) ; if (fd < 0) return 0 ; dir = fdopendir(fd) ; if (!dir) fd_close(fd) ; |