diff options
author | Csaba Henk <csaba@gluster.com> | 2010-06-24 12:41:03 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-06-25 03:16:39 -0700 |
commit | 2c5c3cedc096c36ef9d004ffa0cdb5324d2915e6 (patch) | |
tree | 626f99a789cf03ae342f0ddb5ad3823ce135fdf5 /xlators/protocol | |
parent | 29893bcba579f7e37a6ace018ffda1c8abe45550 (diff) |
OS X: fix up rpc protocol
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/lib/src/glusterfs-xdr.h | 1 | ||||
-rw-r--r-- | xlators/protocol/rpc/rpc-lib/src/rpc-transport.h | 1 | ||||
-rw-r--r-- | xlators/protocol/rpc/rpc-lib/src/rpcsvc.h | 2 | ||||
-rw-r--r-- | xlators/protocol/rpc/rpc-lib/src/xdr-common.h | 6 | ||||
-rw-r--r-- | xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c | 4 |
5 files changed, 12 insertions, 2 deletions
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.h b/xlators/protocol/lib/src/glusterfs-xdr.h index f99335c42..72f131c74 100644 --- a/xlators/protocol/lib/src/glusterfs-xdr.h +++ b/xlators/protocol/lib/src/glusterfs-xdr.h @@ -7,6 +7,7 @@ #define _GLUSTERFS3_H_RPCGEN #include <rpc/rpc.h> +#include "xdr-common.h" #include "iatt.h" #ifdef __cplusplus diff --git a/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h b/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h index 06ac34a49..b3c7985e0 100644 --- a/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h +++ b/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h @@ -26,6 +26,7 @@ #endif #include <inttypes.h> +#include <rpc/rpc.h> #include <rpc/auth.h> #include <rpc/rpc_msg.h> diff --git a/xlators/protocol/rpc/rpc-lib/src/rpcsvc.h b/xlators/protocol/rpc/rpc-lib/src/rpcsvc.h index c3b003f62..10dc32698 100644 --- a/xlators/protocol/rpc/rpc-lib/src/rpcsvc.h +++ b/xlators/protocol/rpc/rpc-lib/src/rpcsvc.h @@ -38,8 +38,6 @@ #include <pthread.h> #include <sys/uio.h> - -#include <sys/uio.h> #include <inttypes.h> #include "compat.h" diff --git a/xlators/protocol/rpc/rpc-lib/src/xdr-common.h b/xlators/protocol/rpc/rpc-lib/src/xdr-common.h index 775beb286..0c9ffb2f8 100644 --- a/xlators/protocol/rpc/rpc-lib/src/xdr-common.h +++ b/xlators/protocol/rpc/rpc-lib/src/xdr-common.h @@ -27,6 +27,12 @@ #include <rpc/rpc.h> +#if GF_DARWIN_HOST_OS +#define xdr_u_quad_t xdr_u_int64_t +#define xdr_quad_t xdr_int64_t +#define xdr_uint32_t xdr_u_int32_t +#endif + struct auth_glusterfs_parms { u_quad_t lk_owner; u_int pid; diff --git a/xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c b/xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c index 1bcd9bbaa..088bddbf5 100644 --- a/xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c +++ b/xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c @@ -178,7 +178,11 @@ xdr_to_auth_unix_cred (char *msgbuf, int msglen, struct authunix_parms *au, return -1; au->aup_machname = machname; +#ifdef GF_DARWIN_HOST_OS + au->aup_gids = (int *)gids; +#else au->aup_gids = gids; +#endif xdrmem_create (&xdr, msgbuf, msglen, XDR_DECODE); |