AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_ defined by <sys/types.h> alone. It is, but it warns, and that's ugly. To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so the warning makes the compilation test fail.
Cc: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> --- This is a port of ajax's 7040fea02 on libdrm. Honestly, I haven't seen this wall of warnings in Mesa yet, but I suspect this is just by some random "happy accident", so I think we might as well adjust the macro here too before something changes and we get spammed. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index ce5301f3e4..ac07daa591 100644 --- a/configure.ac +++ b/configure.ac @@ -787,7 +787,12 @@ if test "x$enable_asm" = xyes; then esac fi +save_CFLAGS="$CFLAGS" +export CFLAGS="$CFLAGS -Werror" AC_HEADER_MAJOR +CFLAGS="$save_CFLAGS" + + 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"]) -- Cheers, Eric _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
