diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/lib/src/rpcsvc.h | 5 | ||||
-rw-r--r-- | xlators/nfs/lib/src/xdr-nfs3.c | 6 | ||||
-rw-r--r-- | xlators/nfs/lib/src/xdr-rpc.c | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.h b/xlators/nfs/lib/src/rpcsvc.h index cea55746c90..a77021ac47e 100644 --- a/xlators/nfs/lib/src/rpcsvc.h +++ b/xlators/nfs/lib/src/rpcsvc.h @@ -38,6 +38,11 @@ #include <pthread.h> #include <sys/uio.h> +#ifdef GF_DARWIN_HOST_OS +#include <nfs/rpcv2.h> +#define NGRPS RPCAUTH_UNIXGIDS +#endif + #define GF_RPCSVC "rpc-service" #define RPCSVC_THREAD_STACK_SIZE ((size_t)(1024 * GF_UNIT_KB)) diff --git a/xlators/nfs/lib/src/xdr-nfs3.c b/xlators/nfs/lib/src/xdr-nfs3.c index d7984be56a4..0360203961c 100644 --- a/xlators/nfs/lib/src/xdr-nfs3.c +++ b/xlators/nfs/lib/src/xdr-nfs3.c @@ -20,6 +20,12 @@ #include "xdr-nfs3.h" #include "mem-pool.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 + bool_t xdr_uint64 (XDR *xdrs, uint64 *objp) { diff --git a/xlators/nfs/lib/src/xdr-rpc.c b/xlators/nfs/lib/src/xdr-rpc.c index 5f8521ff382..071462242b1 100644 --- a/xlators/nfs/lib/src/xdr-rpc.c +++ b/xlators/nfs/lib/src/xdr-rpc.c @@ -22,6 +22,7 @@ #include "config.h" #endif +#include <string.h> #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> #include <arpa/inet.h> @@ -178,7 +179,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); |