Include 'sys/sysmacros.h' for GCC-9 33/221233/1 accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/hotfix/20201103.000656 accepted/tizen/6.5/unified/20211028.224606 accepted/tizen/unified/20200106.141559 submit/tizen/20200103.083647 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 submit/tizen_6.5/20211028.163301 tizen_6.0.m2_release tizen_6.5.m2_release
authorYunmi Ha <yunmi.ha@samsung.com>
Mon, 30 Dec 2019 07:56:47 +0000 (16:56 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Mon, 30 Dec 2019 07:56:47 +0000 (16:56 +0900)
- 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>
configure.ac
lib/utils_devpath.c
lib/utils_loop.c
lib/utils_wipe.c

index 05574d2..d82a248 100644 (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.])])
index 963785a..897d83b 100644 (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)
index d7b03a1..640d95b 100644 (file)
@@ -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"
 
index 210c566..c70d632 100644 (file)
@@ -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"