[patch] whereis include dirent.h instead sys/dir.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sys/dir.h is an old BSD'ism not carried by klibc,
include dirent directly.

compile tested against glibc.

Signed-off-by: maximilian attems <max@xxxxxxx>


diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c
index 4315379..71ee683 100644
--- a/misc-utils/whereis.c
+++ b/misc-utils/whereis.c
@@ -38,8 +38,9 @@
  */
 
 #include <sys/param.h>
-#include <sys/dir.h>
+#include <sys/types.h>
 #include <sys/stat.h>
+#include <dirent.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -318,7 +319,7 @@ find(char **dirs, char *cp) {
 void
 findin(char *dir, char *cp) {
 	DIR *dirp;
-	struct direct *dp;
+	struct dirent *dp;
 	char *d, *dd;
 	int l;
 	char dirbuf[1024];
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux