From cd8cc0d00d93d89e186fc734597bf3fe81b73417 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 22 Feb 1999 19:05:06 +0000 Subject: [PATCH] add def of dirfd() for those without it --- getcwd.c | 4 ++++ 1 file changed, 4 insertions(+) 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'))) -- 2.40.0