From 37b0064d60c81715d8a4c16e13f42e6ead7aaf22 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 12 Nov 2018 21:20:02 +0100 Subject: [PATCH] Remove a build warning about major/minor defined in sysmacros.h The new glibc 2.26 shows a warning if the code uses major/minor from sys/types.h. Unfortunalte the autoconf macro used do not trigger sysmacros.h inclusion because major/minor are already defined in sys/types.h. --- HISTORY | 4 ++++ cmdline/portable.h | 6 ++++-- configure.ac | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index ad7411fe..57e33ec2 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,10 @@ SnapRAID HISTORY ================ +11.4 2018/12 +============ + * Removed a build warning about major/minor defined now in sys/sysmacros.h. + 11.3 2018/11 ============ * Fixed handing of Linux devices that have multiple slaves. This affects diff --git a/cmdline/portable.h b/cmdline/portable.h index 053ad857..19e6fe1d 100644 --- a/cmdline/portable.h +++ b/cmdline/portable.h @@ -198,9 +198,11 @@ #include #endif -#if MAJOR_IN_MKDEV +#if HAVE_SYS_MKDEV #include -#elif MAJOR_IN_SYSMACROS +#endif + +#if HAVE_SYS_SYSMACROS_H #include #endif diff --git a/configure.ac b/configure.ac index 64861143..318d3214 100644 --- a/configure.ac +++ b/configure.ac @@ -31,11 +31,10 @@ AC_HEADER_ASSERT AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_HEADER_MAJOR AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h limits.h]) AC_CHECK_HEADERS([unistd.h getopt.h fnmatch.h io.h inttypes.h byteswap.h]) AC_CHECK_HEADERS([pthread.h math.h]) -AC_CHECK_HEADERS([sys/file.h sys/ioctl.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h]) +AC_CHECK_HEADERS([sys/file.h sys/ioctl.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h sys/sysmacros.h sys/mkdev.h]) AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h mach/mach_time.h execinfo.h]) dnl Checks for typedefs, structures, and compiler characteristics.