Implement dirfd() on MacOS
authorNaohiro Koriyama <nkoriyama@gmail.com>
Tue, 11 Oct 2011 16:05:05 +0000 (19:05 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 11 Oct 2011 16:05:32 +0000 (19:05 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
compat/dirfd.c

index a7db741..99d79f9 100644 (file)
@@ -29,6 +29,8 @@ int dirfd (DIR *dir)
 {
 #if defined (__sun__)
     return dir->dd_fd;
+#elif defined (__APPLE__)
+    return dir->__dd_fd;
 #else
     (void) dir;
 # ifdef ENOTSUP