]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: Use XDR_CFLAGS in more places
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 16 Nov 2017 13:24:45 +0000 (14:24 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Sat, 18 Nov 2017 09:45:10 +0000 (10:45 +0100)
Since update to glibc-2.26 removed the /usr/include/rpc/rpc.h we used until now,
it showed us a problem with not using XDR_CFLAGS properly.  On linux that
variable has usually -I/usr/include/tirpc because we already probe for it
properly, we just don't use it everywhere we need.  It is needed by wireshark
dissector as well as testutilsqemu.c (through includes) so the build fails with:

wireshark/src/packet-libvirt.c:33:10: fatal error: rpc/xdr.h: No such file or directory
 #include <rpc/xdr.h>
          ^~~~~~~~~~~

and

In file included from ../src/logging/log_manager.h:29:0,
                 from ../src/qemu/qemu_domain.h:40,
                 from testutilsqemu.c:11:
../src/logging/log_protocol.h:9:10: fatal error: rpc/rpc.h: No such file or directory
 #include <rpc/rpc.h>
          ^~~~~~~~~~~

Since lot of tests use testutilsqemu.c it is easier to add XDR_CFLAGS to
AM_CFLAGS than adding it to all $binary_CFLAGS.  It's just for tests and we
already have bunch of CFLAGS there anyway.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tests/Makefile.am
tools/Makefile.am

index 4627f5d2ba2085c84683f23f76779e8e67b0a447..5686ea5198b2958fcc0a5a7f31ece85330f5bcf0 100644 (file)
@@ -48,6 +48,7 @@ AM_CFLAGS = \
        $(APPARMOR_CFLAGS) \
        $(YAJL_CFLAGS) \
        $(COVERAGE_CFLAGS) \
+       $(XDR_CFLAGS) \
        $(WARN_CFLAGS)
 
 AM_LDFLAGS = \
index 7513a73ac020eef8e9ed340edad93237b4858cb8..2913bba8cce87db2f524d902dece176d31ed638d 100644 (file)
@@ -428,7 +428,7 @@ if WITH_WIRESHARK_DISSECTOR
 
 ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
 wireshark_src_libvirt_la_CPPFLAGS = \
-       -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS)
+       -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) $(XDR_CFLAGS)
 wireshark_src_libvirt_la_LDFLAGS = -avoid-version -module
 nodist_wireshark_src_libvirt_la_SOURCES = wireshark/src/plugin.c
 wireshark_src_libvirt_la_SOURCES = \