From 291588c6d912e137ef4d8c19d0447e43c7d87bc4 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Mon, 30 May 2011 04:18:00 +0000 Subject: fuse: NetBSD portability fixes On NetBSD use libperfuse(3), rename umount2(2) as unmount(2), and skip inexistant /etc/mtab management. Thanks to: Emmanuel Dreyfus Signed-off-by: Anand Avati BUG: 2923 (NetBSD port) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923 --- contrib/fuse-lib/mount.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'contrib') diff --git a/contrib/fuse-lib/mount.c b/contrib/fuse-lib/mount.c index f922b07d4..85a366894 100644 --- a/contrib/fuse-lib/mount.c +++ b/contrib/fuse-lib/mount.c @@ -20,7 +20,9 @@ #include #include #include +#ifndef __NetBSD__ #include +#endif /* __NetBSD__ */ #include #include #include @@ -28,6 +30,11 @@ #include #include +#ifdef __NetBSD__ +#include +#define umount2(dir, flags) unmount(dir, ((flags) != 0) ? MNT_FORCE : 0) +#endif + #ifdef FUSE_UTIL #define MALLOC(size) malloc (size) #define FREE(ptr) free (ptr) @@ -58,6 +65,7 @@ * - there are some other minor things */ +#ifndef __NetBSD__ static int mtab_needs_update (const char *mnt) { @@ -91,6 +99,9 @@ mtab_needs_update (const char *mnt) return 1; } +#else /* __NetBSD__ */ +#define mtab_needs_update(x) 1 +#endif /* __NetBSD__ */ #ifndef FUSE_UTIL static -- cgit