summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--lib/utils_devpath.c3
-rw-r--r--lib/utils_loop.c3
-rw-r--r--lib/utils_wipe.c3
4 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 05574d2..d82a248 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ PKG_PROG_PKG_CONFIG
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \
- ctype.h unistd.h locale.h byteswap.h endian.h)
+ sys/sysmacros.h ctype.h unistd.h locale.h byteswap.h endian.h)
AC_CHECK_HEADERS(uuid/uuid.h,,[AC_MSG_ERROR([You need the uuid library.])])
AC_CHECK_HEADER(libdevmapper.h,,[AC_MSG_ERROR([You need the device-mapper library.])])
diff --git a/lib/utils_devpath.c b/lib/utils_devpath.c
index 963785a..897d83b 100644
--- a/lib/utils_devpath.c
+++ b/lib/utils_devpath.c
@@ -31,6 +31,9 @@
#include <limits.h>
#include <sys/stat.h>
#include <sys/types.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* for major, minor */
+#endif
#include "internal.h"
static char *__lookup_dev(char *path, dev_t dev, int dir_level, const int max_level)
diff --git a/lib/utils_loop.c b/lib/utils_loop.c
index d7b03a1..640d95b 100644
--- a/lib/utils_loop.c
+++ b/lib/utils_loop.c
@@ -29,6 +29,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <linux/loop.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* for major, minor */
+#endif
#include "utils_loop.h"
diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c
index 210c566..c70d632 100644
--- a/lib/utils_wipe.c
+++ b/lib/utils_wipe.c
@@ -30,6 +30,9 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* for major, minor */
+#endif
#include "libcryptsetup.h"
#include "internal.h"