mesa: Use AC_HEADER_MAJOR to include correct header for major().
authorMatt Turner <mattst88@gmail.com>
Thu, 21 Jul 2016 18:46:23 +0000 (11:46 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 26 Jul 2016 19:12:41 +0000 (12:12 -0700)
Gentoo has been smoke testing an upcoming change to glibc.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=580392

configure.ac
src/gallium/winsys/svga/drm/vmw_screen.c
src/gbm/main/gbm.c
src/loader/loader.c

index 5c196a93196371e7ce68043c34a4c3a74d26ac34..f6b27ae086ab7c300eff54bc500d7ccedf0ed6d5 100644 (file)
@@ -777,6 +777,7 @@ if test "x$enable_asm" = xyes; then
     esac
 fi
 
+AC_HEADER_MAJOR
 AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
 AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
 AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
index 7fcb6d2771438613e93bc72144b0778bf24752c8..74c77c54e847e68b17e1ea8aae726554b438a446 100644 (file)
 #include "util/u_memory.h"
 #include "pipe/p_compiler.h"
 #include "util/u_hash_table.h"
-#include <sys/types.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
 #include <sys/stat.h>
 #include <unistd.h>
 
index 5a6e758e7a50d8910709fe2a1b9ea96690c5fc05..20ff3f280a7d3b0896fea0c87f07cb18e9c353b2 100644 (file)
 #include <string.h>
 #include <stdint.h>
 
-#include <sys/types.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
index 522fba354c911d8eb49ef53a208d98c483fa4e9d..56ffc5d77a799ad5b14a789cd929bee009511cb4 100644 (file)
 #include "xmlpool.h"
 #endif
 #endif
-#ifdef HAVE_SYSFS
-#include <sys/types.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
 #endif
 #include "loader.h"