summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-12-12 12:05:32 +0100
committerAnand Avati <avati@redhat.com>2012-12-12 23:05:55 -0800
commit9a395d2db3a88d4ba479dfe0f5ad3769efee7f3a (patch)
tree6acc5816e6d594126488afe1c7b310c90536e5f0
parent06d4cced24f9854e3439f03a0c940adc5306de48 (diff)
NetBSD MS_RDONLY portability build fix
NetBSD uses MNT_RDONLY where Linux uses MS_RDONLY BUG: 815227 Change-Id: I8d78831f07e575b215aabc46eaa66e5e277bda0e Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4299 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--contrib/fuse-lib/mount-gluster-compat.h1
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/contrib/fuse-lib/mount-gluster-compat.h b/contrib/fuse-lib/mount-gluster-compat.h
index 17c11e78920..4fc20623bc9 100644
--- a/contrib/fuse-lib/mount-gluster-compat.h
+++ b/contrib/fuse-lib/mount-gluster-compat.h
@@ -33,6 +33,7 @@
#ifdef __NetBSD__
#include <perfuse.h>
#define umount2(dir, flags) unmount(dir, ((flags) != 0) ? MNT_FORCE : 0)
+#define MS_RDONLY MNT_RDONLY
#endif
#ifdef linux
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 68f9e754116..974969eb110 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -10,6 +10,11 @@
#include <sys/wait.h>
#include "fuse-bridge.h"
+#include "mount-gluster-compat.h"
+
+#ifdef __NetBSD__
+#undef open /* in perfuse.h, pulled from mount-gluster-compat.h */
+#endif
static int gf_fuse_conn_err_log;
static int gf_fuse_xattr_enotsup_log;