- Include 'sys/sysmacros.h' if present.
(Needed for major/minor definitions.)
- cherry picked from commit
1d15da1bfc2b3acf1278ff087ddc303d945dd023
Change-Id: Ia7ba6e242870dc25dcea27d234147a6c3f1731bf
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
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.])])
#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)
#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"
#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"