summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/rpc')
-rw-r--r--xlators/protocol/rpc/rpc-lib/src/rpc-transport.h1
-rw-r--r--xlators/protocol/rpc/rpc-lib/src/rpcsvc.h2
-rw-r--r--xlators/protocol/rpc/rpc-lib/src/xdr-common.h6
-rw-r--r--xlators/protocol/rpc/rpc-lib/src/xdr-rpc.c4
4 files changed, 11 insertions, 2 deletions
diff --git a/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h b/xlators/protocol/rpc/rpc-lib/src/rpc-transport.h
index 06ac34a49ed..b3c7985e095 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 c3b003f629f..10dc32698ad 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 775beb2865e..0c9ffb2f827 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 1bcd9bbaa4c..088bddbf5b7 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);