[libvirt PATCH v2] scripts/rpcgen: fix 64 unsigned int test on macOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux