summaryrefslogtreecommitdiffstats
path: root/rpc/xdr
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-04-17 15:54:34 -0700
committerAnand Avati <avati@redhat.com>2014-04-24 14:41:48 -0700
commita3cb38e3edf005bef73da4c9cfd958474a14d50f (patch)
treea406029332a9eb096c14d441160bb670a42df8cb /rpc/xdr
parent9c13471b109587a639662fc690384285bee02bc6 (diff)
build: MacOSX Porting fixes
git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Dennis Schafroth <dennis@schafroth.com> Tested-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Dennis Schafroth <dennis@schafroth.com> Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/xdr')
-rw-r--r--rpc/xdr/src/nlm4-xdr.h16
-rw-r--r--rpc/xdr/src/xdr-generic.c6
-rw-r--r--rpc/xdr/src/xdr-nfs3.h1
3 files changed, 13 insertions, 10 deletions
diff --git a/rpc/xdr/src/nlm4-xdr.h b/rpc/xdr/src/nlm4-xdr.h
index 4391a479019..8545694a658 100644
--- a/rpc/xdr/src/nlm4-xdr.h
+++ b/rpc/xdr/src/nlm4-xdr.h
@@ -17,13 +17,7 @@
#define _NLM_H_RPCGEN
#include <rpc/rpc.h>
-
-#if defined(__NetBSD__)
-#define xdr_u_quad_t xdr_u_int64_t
-#define xdr_quad_t xdr_int64_t
-#define xdr_uint32_t xdr_u_int32_t
-#define xdr_uint64_t xdr_u_int64_t
-#endif
+#include "xdr-common.h"
#ifdef __cplusplus
extern "C" {
@@ -33,6 +27,14 @@ extern "C" {
#define LM_MAXSTRLEN 1024
#define MAXNAMELEN 1025
+#if defined(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
+#define xdr_uint64_t xdr_u_int64_t
+#define uint64_t u_int64_t
+#endif
+
#if defined(__NetBSD__)
#define xdr_u_quad_t xdr_u_int64_t
#define xdr_quad_t xdr_int64_t
diff --git a/rpc/xdr/src/xdr-generic.c b/rpc/xdr/src/xdr-generic.c
index 58d1ee77ee2..ee29f3dfa4e 100644
--- a/rpc/xdr/src/xdr-generic.c
+++ b/rpc/xdr/src/xdr-generic.c
@@ -24,7 +24,7 @@ xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc)
xdrmem_create (&xdr, outmsg.iov_base, (unsigned int)outmsg.iov_len,
XDR_ENCODE);
- if (!proc (&xdr, res)) {
+ if (!proc (&xdr, res, 0)) {
ret = -1;
goto ret;
}
@@ -48,7 +48,7 @@ xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc)
xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
- if (!proc (&xdr, args)) {
+ if (!proc (&xdr, args, 0)) {
ret = -1;
goto ret;
}
@@ -72,7 +72,7 @@ xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc,
xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
- if (!proc (&xdr, args)) {
+ if (!proc (&xdr, args, 0)) {
ret = -1;
goto ret;
}
diff --git a/rpc/xdr/src/xdr-nfs3.h b/rpc/xdr/src/xdr-nfs3.h
index 6f6b0e1f9b0..3861771e299 100644
--- a/rpc/xdr/src/xdr-nfs3.h
+++ b/rpc/xdr/src/xdr-nfs3.h
@@ -95,6 +95,7 @@ enum nfsstat3 {
NFS3ERR_SERVERFAULT = 10006,
NFS3ERR_BADTYPE = 10007,
NFS3ERR_JUKEBOX = 10008,
+ NFS3ERR_END_OF_LIST = -1,
};
typedef enum nfsstat3 nfsstat3;