summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2011-05-20 16:56:31 +0000
committerAnand Avati <avati@gluster.com>2011-05-30 04:49:03 -0700
commitb0c07f4db5f1ed2eeb58709d1021e11ca8fd5600 (patch)
tree06e89d5beef7c7fb166f21306b9bc5a4e72601c2 /rpc
parent7eb3ba062cd0d8ad2d4692c99185af2afde0ee05 (diff)
rpc: NetBSD portability fixes
NetBSD's <dirent.h> does a #defiine d_ino d_fileno. Since glusterfs declares structs with d_ino members, we must include <dirent.h> early so that d_ino get preprocessed into d_fileno conssitently. Also define proper xdr types for NetBSD. Thanks to: Emmanuel Dreyfus <manu@netbsd.org> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2923 (NetBSD port) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/xdr-common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index e49aa4882..c69bfa834 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -30,6 +30,11 @@
#include <rpc/xdr.h>
#include <sys/uio.h>
+#ifdef __NetBSD__
+#include <dirent.h>
+#endif /* __NetBSD__ */
+
+
enum gf_dump_procnum {
GF_DUMP_NULL,
GF_DUMP_DUMP,
@@ -47,6 +52,13 @@ enum gf_dump_procnum {
#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
+#define xdr_uint32_t xdr_u_int32_t
+#endif
+
+
#if GF_SOLARIS_HOST_OS
#define u_quad_t uint64_t
#define quad_t int64_t