summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-17 07:07:57 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-21 00:31:47 -0700
commitbfb10f41a8e3fe7326f507451459529c5b39b72e (patch)
tree08f63cba247e4d652242d3906108ef5ccc860f50 /xlators/nfs/lib
parent18d982e6d0d330af8ccd2b12252ae29fe0932023 (diff)
OS X: NFS adjustments needed for OS X
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
Diffstat (limited to 'xlators/nfs/lib')
-rw-r--r--xlators/nfs/lib/src/rpcsvc.h5
-rw-r--r--xlators/nfs/lib/src/xdr-nfs3.c6
-rw-r--r--xlators/nfs/lib/src/xdr-rpc.c5
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);