]> granicus.if.org Git - sudo/commitdiff
Better check for dirfd macro--we now set HAVE_DIRFD for the macro version too.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jun 2004 20:53:31 +0000 (20:53 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jun 2004 20:53:31 +0000 (20:53 +0000)
Added check for dd_fd in `DIR' if no dirfd is found; this is now used to
confitionally define the dirfd macro in compat.h.

compat.h

index 2d87cffc7a25d3168e4d036304a267056116a09b..d4318e72e34b3c3feb7a35865e0df075c00a8f31 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -206,8 +206,9 @@ typedef struct sigaction sigaction_t;
 /*
  * If dirfd() does not exists, hopefully dd_fd does.
  */
-#if !defined(HAVE_DIRFD) && !defined(dirfd)
+#if !defined(HAVE_DIRFD) && defined(HAVE_DD_FD)
 # define dirfd(_d)     ((_d)->dd_fd)
+# define HAVE_DIRFD
 #endif
 
 /*