From d95f56c734abfda42c8c6fc80a12ac7ca5af5258 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: May 03 2019 15:42:54 +0000 Subject: build: Use XDR_CFLAGS in more places 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 ^~~~~~~~~~~ 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 ^~~~~~~~~~~ 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 (cherry picked from commit 74a13be4a4562affcf721ba32f42f8a27ec3557d) --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 0cd8391..3665fc1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,6 +46,7 @@ AM_CFLAGS = \ $(APPARMOR_CFLAGS) \ $(YAJL_CFLAGS) \ $(COVERAGE_CFLAGS) \ + $(XDR_CFLAGS) \ $(WARN_CFLAGS) AM_LDFLAGS = \ diff --git a/tools/Makefile.am b/tools/Makefile.am index e7e42c3..3bc3746 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -401,7 +401,7 @@ if WITH_WIRESHARK_DISSECTOR ws_plugindir = $(plugindir) 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 = \