This header provides major/minor/makedev funcs under most Linux C
libs. Pull it in to fix building with newer versions that drop the
implicit include via sys/types.h.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94231
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
AC_SYS_LARGEFILE
AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h sys/select.h])
+AC_HEADER_MAJOR
+AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
# Initialize libtool
LT_PREREQ([2.2])
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
#include "libdrm_macros.h"
#include "internal.h"
#include <sys/ioctl.h>
#include <sys/time.h>
#include <stdarg.h>
-#ifdef HAVE_SYS_MKDEV_H
-# include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
#endif
#include <math.h>