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.
This commit is contained in:
Andrea Mazzoleni 2018-11-12 21:20:02 +01:00
parent 825493b56d
commit 37b0064d60
3 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -198,9 +198,11 @@
#include <sys/types.h>
#endif
#if MAJOR_IN_MKDEV
#if HAVE_SYS_MKDEV
#include <sys/mkdev.h>
#elif MAJOR_IN_SYSMACROS
#endif
#if HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif

View file

@ -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.