# HG changeset patch # User jeremy avnet # Date 1265310721 28800 # Node ID 52da2b117343a8f5c8334ba89a815f48cb28de6d # Parent 06a7ec660037bacdaebb81742f3ff4f93ab67799 Changes to compile the client on OS X. See http://www.mattvsworld.com/blog/2010/01/compiling-libvirt-and-ruby-libvirt-on-mac-os-x/ diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c --- a/src/remote/remote_protocol.c +++ b/src/remote/remote_protocol.c @@ -8,6 +8,9 @@ #include "internal.h" #include +#define xdr_uint32_t xdr_u_int32_t +#define xdr_uint64_t xdr_u_int64_t + bool_t xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp) { diff --git a/src/remote/rpcgen_fix.pl b/src/remote/rpcgen_fix.pl --- a/src/remote/rpcgen_fix.pl +++ b/src/remote/rpcgen_fix.pl @@ -29,7 +29,7 @@ # Portability for Solaris RPC s/u_quad_t/uint64_t/g; s/quad_t/int64_t/g; - s/xdr_u_quad_t/xdr_uint64_t/g; + s/xdr_u_quad_t/xdr_u_int64_t/g; s/xdr_quad_t/xdr_int64_t/g; s/IXDR_GET_LONG/IXDR_GET_INT32/g; s,#include "\./remote_protocol\.h",#include "remote_protocol.h",; diff --git a/src/util/network.c b/src/util/network.c --- a/src/util/network.c +++ b/src/util/network.c @@ -47,7 +47,7 @@ return(-1); for (i = 0;i < 8;i++) { - (*tab)[i] = ntohs(addr->inet6.sin6_addr.s6_addr16[i]); + (*tab)[i] = ntohs(addr->inet6.sin6_addr.s6_addr[i]); } return(0); diff --git a/tools/virsh.c b/tools/virsh.c --- a/tools/virsh.c +++ b/tools/virsh.c @@ -7051,7 +7051,7 @@ VIR_FREE(command); return -1; } - if (command_ret != WEXITSTATUS (0)) { + if (command_ret != 0) { vshError(ctl, _("%s: command exited with non-zero status"), command); VIR_FREE(command);