[Mesa-dev] [PATCH] mesa: Use AC_HEADER_MAJOR to include correct header for major().

Matt Turner mattst88 at gmail.com
Thu Jul 21 18:47:52 UTC 2016


Gentoo has been smoke testing an upcoming change to glibc.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=580392
---
 configure.ac                             | 1 +
 src/gallium/winsys/svga/drm/vmw_screen.c | 7 ++++++-
 src/gbm/main/gbm.c                       | 7 ++++++-
 src/loader/loader.c                      | 7 +++++--
 4 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2668a69..d102e54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -771,6 +771,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"])
diff --git a/src/gallium/winsys/svga/drm/vmw_screen.c b/src/gallium/winsys/svga/drm/vmw_screen.c
index 7fcb6d2..74c77c5 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen.c
@@ -31,7 +31,12 @@
 #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>
 
diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index 5a6e758..20ff3f2 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -31,7 +31,12 @@
 #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>
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 522fba3..56ffc5d 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -80,8 +80,11 @@
 #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"
 
-- 
2.7.3



More information about the mesa-dev mailing list