[libvirt] [PATCH] configure: Check for major() more strictly

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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index f6076bd..f322c4a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.8.4

On Tue, Sep 13, 2016 at 04:31:45PM +0200, Michal Privoznik wrote:
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 | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac index f6076bd..f322c4a 100644 --- a/configure.ac +++ b/configure.ac @@ -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
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Michal Privoznik