--- a/common/protocol/Makefile.am 2017-11-16 22:50:02.024523197 +0000 +++ a/common/protocol/Makefile.am 2017-12-19 09:47:45.809947629 +0000 @@ -34,7 +34,7 @@ # warnings here. libprotocol_la_SOURCES = guestfs_protocol.c guestfs_protocol.h libprotocol_la_CFLAGS = \ - -Wall -Wno-unused -fno-strict-aliasing $(GCC_VISIBILITY_HIDDEN) + -Wall -Wno-unused -fno-strict-aliasing $(GCC_VISIBILITY_HIDDEN) $(RPC_CFLAGS) if HAVE_RPCGEN RPCGEN_DEFS = --- a/fish/Makefile.am 2017-11-16 22:50:02.101523178 +0000 +++ a/fish/Makefile.am 2017-12-19 09:51:49.041063222 +0000 @@ -101,7 +101,7 @@ # This convenience library is solely to compile its generated sources with # custom flags. librc_protocol_la_SOURCES = rc_protocol.c rc_protocol.h -librc_protocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing +librc_protocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing $(RPC_CFLAGS) # Build the command lookup perfect hash code. The generated code has # lots of warnings so we must compile it in a separate mini-library. --- a/localenv 1970-01-01 01:00:00.000000000 +0100 +++ a/localenv 2017-12-19 10:35:56.724217122 +0000 @@ -0,0 +1, @@ +RPC_CFLAGS = -I/usr/include/tirpc --- a/daemon/Makefile.am 2017-11-16 22:50:02.052523190 +0000 +++ a/daemon/Makefile.am 2017-12-19 10:53:11.091290471 +0000 @@ -209,7 +209,8 @@ $(HIVEX_CFLAGS) \ $(SD_JOURNAL_CFLAGS) \ $(YAJL_CFLAGS) \ - $(PCRE_CFLAGS) + $(PCRE_CFLAGS) \ + $(RPC_CFLAGS) # Manual pages and HTML files for the website. if INSTALL_DAEMON --- a/lib/Makefile.am 2017-11-16 22:50:02.175523160 +0000 +++ a/lib/Makefile.am 2017-12-19 10:55:46.726467764 +0000 @@ -145,7 +145,8 @@ $(PCRE_CFLAGS) \ $(LIBVIRT_CFLAGS) \ $(LIBXML2_CFLAGS) \ - $(YAJL_CFLAGS) + $(YAJL_CFLAGS) \ + $(RPC_CFLAGS) libguestfs_la_LIBADD = \ ../common/errnostring/liberrnostring.la \ @@ -194,7 +195,8 @@ libvirt_is_version_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ - $(LIBVIRT_CFLAGS) + $(LIBVIRT_CFLAGS) \ + $(RPC_CFLAGS) endif # Tests: main tests are in tests/c-api. Here we just have some @@ -212,7 +214,7 @@ -I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \ -I$(top_srcdir)/lib -I. unit_tests_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) $(RPC_CFLAGS) # We have to link this to libguestfs, but because we want to test # non-exported functions we have to link with the objects not the # library. --- a/fish/Makefile.am 2017-12-19 11:02:42.617558130 +0000 +++ a/fish/Makefile.am 2017-12-19 11:11:04.419079589 +0000 @@ -110,7 +110,7 @@ -I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \ -I$(top_srcdir)/lib -I$(top_builddir)/lib \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib -libcmds_la_CFLAGS = +libcmds_la_CFLAGS = $(RPC_CFLAGS) libcmds_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la \ $(LTLIBINTL) @@ -134,7 +134,8 @@ guestfish_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(LIBCONFIG_CFLAGS) \ - $(LIBXML2_CFLAGS) + $(LIBXML2_CFLAGS) \ + $(RPC_CFLAGS) guestfish_LDADD = \ $(top_builddir)/common/edit/libedit.la \