diff options
author | Dan McGee <dan@archlinux.org> | 2010-11-16 20:13:36 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 20:29:20 -0600 |
commit | fc74ef93b6945dfac299433a9418fdd31798f6b6 (patch) | |
tree | 13f432eb666db3b2d825cfcc1d50afc2293782b4 /lib/libalpm | |
parent | 8e9a69e8f66b9b1a13e01ef0b67a78f2014754fa (diff) |
dirent usage cleanup
We were including the header in a lot of places it is no longer used.
Additionally, use the correct autoconf macro for determining whether
d_type is available as a member: HAVE_STRUCT_DIRENT_D_TYPE.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/be_local.c | 2 | ||||
-rw-r--r-- | lib/libalpm/be_sync.c | 1 | ||||
-rw-r--r-- | lib/libalpm/db.c | 1 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 1 |
4 files changed, 1 insertions, 4 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 22127520..988248d8 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -340,7 +340,7 @@ static int checkdbdir(pmdb_t *db) static int is_dir(const char *path, struct dirent *entry) { -#ifdef DT_DIR +#ifdef HAVE_STRUCT_DIRENT_D_TYPE return(entry->d_type == DT_DIR); #else char buffer[PATH_MAX]; diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index bd8d132d..b6c99372 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -21,7 +21,6 @@ #include "config.h" #include <errno.h> -#include <dirent.h> #include <ctype.h> #include <locale.h> diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 79d20d49..1e7d3a2b 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -29,7 +29,6 @@ #include <errno.h> #include <string.h> #include <sys/stat.h> -#include <dirent.h> #include <regex.h> #include <time.h> diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 8609ed53..2f307750 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -31,7 +31,6 @@ #include <stdint.h> /* intmax_t */ #include <unistd.h> #include <time.h> -#include <dirent.h> /* libalpm */ #include "sync.h" |