]> xenbits.xensource.com Git - people/aperard/libvirt.git/commitdiff
scripts/rpcgen: fix 64 unsigned int test on macOS
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 30 Nov 2023 14:07:55 +0000 (14:07 +0000)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 1 Dec 2023 12:50:16 +0000 (13:50 +0100)
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@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
scripts/rpcgen/tests/test_demo.c

index 931f25f9829d49c66e24bd63b0e0e5705555d0b7..ae19a674cf1ecd558c032f3fc031453cc41cdad6 100644 (file)
@@ -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"