From: Todd C. Miller Date: Mon, 22 Feb 1999 19:05:06 +0000 (+0000) Subject: add def of dirfd() for those without it X-Git-Tag: SUDO_1_5_9~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd8cc0d00d93d89e186fc734597bf3fe81b73417;p=sudo add def of dirfd() for those without it --- diff --git a/getcwd.c b/getcwd.c index 503925f04..d210a6f3e 100644 --- a/getcwd.c +++ b/getcwd.c @@ -72,6 +72,10 @@ #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')))