summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-05-04 12:25:01 -0400
committerAdam Jackson <ajax@redhat.com>2017-05-04 14:36:55 -0400
commit7040fea0280bad527ed4b3d5eee7d7bfbf303efc (patch)
tree4deb4eb3a75454a4366663e0470275df680f53a1
parent7c27cd7c5da0b87cea0dacd454307e2613d3b415 (diff)
configure: Fix the <sys/sysmacros.h> check
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. Reviewed-by: Emil Velikov <emil.velilkov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e5158b7d..43fcf68f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_FUNC_ALLOCA
+save_CFLAGS="$CFLAGS"
+export CFLAGS="$CFLAGS -Werror"
AC_HEADER_MAJOR
+CFLAGS="$save_CFLAGS"
+
AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
# Initialize libtool