diff options
author | Milan Broz <gmazyland@gmail.com> | 2016-04-19 10:57:45 +0200 |
---|---|---|
committer | Mikhail Kashkarov <m.kashkarov@partner.samsung.com> | 2019-12-13 11:41:48 +0300 |
commit | 1d15da1bfc2b3acf1278ff087ddc303d945dd023 (patch) | |
tree | 6f0532cac0059f6f186513fc6ee53c022bb5374f | |
parent | deca7dd12c9a7c39dce2b2131a5669a50cad74c0 (diff) | |
download | cryptsetup-1d15da1bfc2b3acf1278ff087ddc303d945dd023.tar.gz cryptsetup-1d15da1bfc2b3acf1278ff087ddc303d945dd023.tar.bz2 cryptsetup-1d15da1bfc2b3acf1278ff087ddc303d945dd023.zip |
Include sys/sysmacros.h if present.sandbox/mkashkarov/tizen_6.0_build
Needed for major/minor definitions.
Thanks Mike Frysinger for pointing this out.
(cherry picked from commit 54c4b1656f93997ae5624051c91ea10249e5a823)
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/utils_devpath.c | 3 | ||||
-rw-r--r-- | lib/utils_loop.c | 3 | ||||
-rw-r--r-- | lib/utils_wipe.c | 3 |
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..1e0933a 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..248b58f 100644 --- a/lib/utils_loop.c +++ b/lib/utils_loop.c @@ -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" diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c index 210c566..2b47bca 100644 --- a/lib/utils_wipe.c +++ b/lib/utils_wipe.c @@ -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" |