defined, so we include it anyways if it exists in order to avoid warnings.
AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h)
AC_CHECK_HEADERS(utime.h wchar.h wctype.h)
AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
-AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
+AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h)
if test "$enable_zlib" != "no"; then
AC_CHECK_HEADERS(zlib.h)
fi
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: fsmagic.c,v 1.79 2018/10/02 00:38:33 christos Exp $")
+FILE_RCSID("@(#)$File: fsmagic.c,v 1.80 2019/04/23 18:59:27 christos Exp $")
#endif /* lint */
#include "magic.h"
# include <sys/mkdev.h>
# define HAVE_MAJOR
#endif
-#ifdef MAJOR_IN_SYSMACROS
+#ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
# define HAVE_MAJOR
#endif
-#ifdef major /* Might be defined in sys/types.h. */
+#if defined(major) && !defined(HAVE_MAJOR)
+/* Might be defined in sys/types.h. */
# define HAVE_MAJOR
#endif
#ifdef WIN32