Skip to content

Instantly share code, notes, and snippets.

@adarobin
Last active May 4, 2018 20:58
Show Gist options
  • Save adarobin/48d6682248b70ec6c2d020f3464ccdae to your computer and use it in GitHub Desktop.
Save adarobin/48d6682248b70ec6c2d020f3464ccdae to your computer and use it in GitHub Desktop.
libguestfs configure patch for macos
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 17cf556d9..b78a5cefa 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -181,9 +181,14 @@ PKG_CHECK_MODULES([RPC], [libtirpc], [], [
# If we don't have libtirpc, then we must have <rpc/xdr.h> and
# some library to link to in libdir.
RPC_CFLAGS=""
+ AC_CHECK_HEADER([rpc/types.h], [AC_DEFINE([HAVE_RPC_TYPES_H],
+ [], [no rpc/types.h])])
AC_CHECK_HEADER([rpc/xdr.h],[],[
- AC_MSG_ERROR([XDR header files are required])
- ])
+ AC_MSG_ERROR([XDR header files are required])],
+[#ifdef HAVE_RPC_TYPES_H
+# include <rpc/types.h>
+#endif
+])
old_LIBS="$LIBS"
LIBS=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment