]> granicus.if.org Git - sudo/commitdiff
add def of dirfd() for those without it
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 22 Feb 1999 19:05:06 +0000 (19:05 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 22 Feb 1999 19:05:06 +0000 (19:05 +0000)
getcwd.c

index 503925f043ddc3cd73944a4b97636b667ef7b2a5..d210a6f3ecaf2dc03675eedf771e11cc723fb1fa 100644 (file)
--- a/getcwd.c
+++ b/getcwd.c
 
 #include "compat.h"
 
+#ifndef dirfd
+#  define dirfd(dirp)  ((dirp)->dd_fd)
+#endif
+
 #define        ISDOT(dp) \
        (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
            (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))