]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
configure: Check for major() more strictly
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Sep 2016 14:23:05 +0000 (16:23 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Sep 2016 16:09:55 +0000 (18:09 +0200)
Thing is, in f3f15cc24 I'm trying to adapt libvirt to the newest
glibc where major()/minor()/makedev() are moved from sys/types.h
to sys/sysmacros.h. However, my commit back then expect autoconf
to be fixed too as we already use AC_HEADER_MAJOR to determine
which header file the functions are in, but because the header
files just trigger a warning and not a compile error, the
autoconf macro detects the bad header file.

This is just a workaround until autoconf macro is fixed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
configure.ac

index f6076bd5b3147b5fc8ef687e4332473c81fe3102..f322c4a46f5536f06926968c4b7d5619a7e3fac7 100644 (file)
@@ -144,7 +144,10 @@ AC_TYPE_UID_T
 dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
 AC_LIBTOOL_WIN32_DLL
 
+old_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -Werror"
 AC_HEADER_MAJOR
+CFLAGS=$old_CFLAGS
 
 m4_ifndef([LT_INIT], [
   AM_PROG_LIBTOOL