mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: Reference RPC_CFLAGS where needed
Since glibc-2.26 removed the /usr/include/rpc/rpc.h, it caused problem even
though probing for libtirpc has taken place and worked properly. The problem is
that RPC_CFLAGS (usually `-I/usr/include/tirpc` on Linux) was not used in places
where it was needed. So the build failed with messages like the following:
In file included from guestfs_protocol.c:6:0:
guestfs_protocol.h:9:10: fatal error: rpc/rpc.h: No such file or directory
#include <rpc/rpc.h>
^~~~~~~~~~~
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
committed by
Richard W.M. Jones
parent
31acbfef2f
commit
946d5bf8d4
@@ -34,7 +34,8 @@ noinst_LTLIBRARIES = libprotocol.la
|
||||
# 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
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ guestfish_SOURCES = \
|
||||
# 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.
|
||||
|
||||
Reference in New Issue
Block a user