]> granicus.if.org Git - sudo/commitdiff
added support for /sys/dir.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 26 Mar 1995 01:39:52 +0000 (01:39 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 26 Mar 1995 01:39:52 +0000 (01:39 +0000)
parse.c

diff --git a/parse.c b/parse.c
index 1e8266bac3bd7a3b817b29cf292f5a04b71ba031..8c89993757d697c90ee1f956a5095648ec561197 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -59,7 +59,11 @@ static char rcsid[] = "$Id$";
 #include <netinet/in.h>
 #include <netdb.h>
 #include <sys/stat.h>
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
+#else
+#include <sys/dir.h>
+#endif /* HAVE_DIRENT_H */
 
 #include "sudo.h"
 #include "options.h"
@@ -176,7 +180,11 @@ char *cmnd, *path;
     int plen;
     struct stat cst, pst;
     DIR *dirp;
+#ifdef HAVE_DIRENT_H
     struct dirent *dent;
+#else
+    struct direct *dent;
+#endif /* HAVE_DIRENT_H */
     char buf[MAXCOMMANDLENGTH+1];
 
     if (stat(cmnd, &cst) < 0)
@@ -207,7 +215,7 @@ char *cmnd, *path;
     return(dent != NULL);
 }
 
-#endif
+#endif /* USE_REALPATH */
 
 int
 ntwk_matches(n)