]> err.no Git - util-linux/commitdiff
whereis: include dirent.h instead sys/dir.h
authormaximilian attems <max@stro.at>
Thu, 24 Jul 2008 12:25:06 +0000 (14:25 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 28 Jul 2008 09:08:30 +0000 (11:08 +0200)
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@stro.at>
misc-utils/whereis.c

index 43153799d38e4523a1ba0339366f620f6a118fe6..71ee6835c1e3427772c0dd947d776342161cd1f2 100644 (file)
@@ -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];