Include sys/sysmacros.h if present.

Needed for major/minor definitions.

Thanks Mike Frysinger for pointing this out.
This commit is contained in:
Milan Broz
2016-04-19 10:57:45 +02:00
parent 1000b40a3a
commit 54c4b1656f
4 changed files with 10 additions and 1 deletions

View File

@@ -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.])])

View File

@@ -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)

View File

@@ -28,6 +28,9 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include <linux/loop.h>
#include "utils_loop.h"

View File

@@ -29,6 +29,9 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include <fcntl.h>
#include "libcryptsetup.h"