protocol: Replace missing xdr_uint64_t on macOS

The macOS rpcgen actually generates calls to xdr_uint64_t but doesn't
define them.  Despite this we can just use xdr_int64_t instead since
it's just byte swapping.
This commit is contained in:
Richard W.M. Jones
2022-08-16 13:58:38 +01:00
parent c51d1cfe9a
commit 6c0e5d7f8f
2 changed files with 11 additions and 0 deletions

View File

@@ -196,6 +196,13 @@ PKG_CHECK_MODULES([RPC], [libtirpc], [], [
AC_SUBST([RPC_LIBS])
])
dnl Unsigned 64 bit ints are not available on macOS, but
dnl the signed functions can be used instead.
old_LIBS="$LIBS"
LIBS="$LIBS $RPC_LIBS"
AC_CHECK_FUNCS([xdr_uint64_t])
LIBS="$old_LIBS"
AC_CHECK_PROG([RPCGEN],[rpcgen],[rpcgen],[no])
AM_CONDITIONAL([HAVE_RPCGEN],[test "x$RPCGEN" != "xno"])