Last active
March 19, 2019 15:06
-
-
Save Amar1729/1a9cf7f3e4d7ea598676405fbf81a609 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configure b/configure | |
index 84dce93..3de6e1f 100755 | |
--- a/configure | |
+++ b/configure | |
@@ -59469,10 +59469,17 @@ fi | |
ac_fn_c_check_header_mongrel "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default" | |
if test "x$ac_cv_header_rpc_xdr_h" = xyes; then : | |
+else | |
+ | |
+ # on macOS, rpc/types.h can be usuable without a usable rpc/xdr.h | |
+ ac_fn_c_check_header_mongrel "$LINENO" "rpc/types.h" "ac_cv_header_rpc_types_h" "$ac_includes_default" | |
+if test "x$ac_cv_header_rpc_types_h" = xyes; then : | |
else | |
as_fn_error $? "XDR header files are required" "$LINENO" 5 | |
+fi | |
+ | |
fi | |
diff --git a/daemon/tsk.c b/daemon/tsk.c | |
index af803d7..3e8aaaa 100644 | |
--- a/daemon/tsk.c | |
+++ b/daemon/tsk.c | |
@@ -23,8 +23,8 @@ | |
#include <inttypes.h> | |
#include <string.h> | |
#include <unistd.h> | |
-#include <rpc/xdr.h> | |
#include <rpc/types.h> | |
+#include <rpc/xdr.h> | |
#include "guestfs_protocol.h" | |
#include "daemon.h" | |
diff --git a/lib/tsk.c b/lib/tsk.c | |
index 09e514b..cb1dc94 100644 | |
--- a/lib/tsk.c | |
+++ b/lib/tsk.c | |
@@ -25,8 +25,8 @@ | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <string.h> | |
-#include <rpc/xdr.h> | |
#include <rpc/types.h> | |
+#include <rpc/xdr.h> | |
#include "guestfs.h" | |
#include "guestfs_protocol.h" | |
diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4 | |
index 60f89d4..56add7d 100644 | |
--- a/m4/guestfs_libraries.m4 | |
+++ b/m4/guestfs_libraries.m4 | |
@@ -176,8 +176,12 @@ 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_HEADERS(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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment