summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunmi Ha <yunmi.ha@samsung.com>2019-12-30 16:56:47 +0900
committerYunmi Ha <yunmi.ha@samsung.com>2019-12-30 16:56:47 +0900
commitdb8b6d46a8783e3bb1ab9f9d96e33f840ea1a40f (patch)
tree8b3b3e836072af72ba6f9e6ff41accdace13c74a
parentdeca7dd12c9a7c39dce2b2131a5669a50cad74c0 (diff)
downloadcryptsetup-tizen_6.0_hotfix.tar.gz
cryptsetup-tizen_6.0_hotfix.tar.bz2
cryptsetup-tizen_6.0_hotfix.zip
- 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>
-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"