macOS XDR library is an oddball using xdr_u_int64_t instead of
xdr_uint64_t which everyone else has.
The code generator already does the right thing, but the test
program previously generated with the Linux rpcgen program
does not compile on macOS due to this.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Changed in v2:
- Put compat logic in test_demo.c instead of demo.c,
since the latter is liable to be re-generated
scripts/rpcgen/tests/test_demo.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/rpcgen/tests/test_demo.c b/scripts/rpcgen/tests/test_demo.c
index d6be9e236d..94f1002ac8 100644
--- a/scripts/rpcgen/tests/test_demo.c
+++ b/scripts/rpcgen/tests/test_demo.c
@@ -3,6 +3,10 @@
#include <rpc/xdr.h>
#include <stdbool.h>
+#ifdef __APPLE__
+# define xdr_uint64_t xdr_u_int64_t
+#endif
+
#include "demo.h"
#include "demo.c"
--
2.41.0