summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--lib/libalpm/be_local.c2
-rw-r--r--lib/libalpm/be_sync.c1
-rw-r--r--lib/libalpm/db.c1
-rw-r--r--lib/libalpm/sync.c1
-rw-r--r--src/pacman/callback.c1
6 files changed, 2 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 6f601f4b..e8541d20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,7 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_TYPE_UID_T
+AC_STRUCT_DIRENT_D_TYPE
# Checks for library functions.
AC_FUNC_FORK
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"
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 32dafb50..925f1fcf 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -26,7 +26,6 @@
#include <sys/time.h>
#include <sys/types.h> /* off_t */
#include <unistd.h>
-#include <dirent.h>
#include <wchar.h>
#include <alpm.h>