summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--contrib/fuse-lib/mount.c11
-rw-r--r--libglusterfs/src/compat-errno.c6
3 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9d416aa3..9ff9e474 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,7 +394,6 @@ AC_SUBST(GF_DISTRIBUTION)
GF_HOST_OS=""
GF_LDFLAGS="-rdynamic"
-GF_FUSE_LDADD="-lfuse"
case $host_os in
linux*)
dnl GF_LINUX_HOST_OS=1
diff --git a/contrib/fuse-lib/mount.c b/contrib/fuse-lib/mount.c
index f922b07d..85a36689 100644
--- a/contrib/fuse-lib/mount.c
+++ b/contrib/fuse-lib/mount.c
@@ -20,7 +20,9 @@
#include <fcntl.h>
#include <errno.h>
#include <dirent.h>
+#ifndef __NetBSD__
#include <mntent.h>
+#endif /* __NetBSD__ */
#include <sys/stat.h>
#include <sys/poll.h>
#include <sys/socket.h>
@@ -28,6 +30,11 @@
#include <sys/wait.h>
#include <sys/mount.h>
+#ifdef __NetBSD__
+#include <perfuse.h>
+#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
diff --git a/libglusterfs/src/compat-errno.c b/libglusterfs/src/compat-errno.c
index 55bf198a..d57c0f96 100644
--- a/libglusterfs/src/compat-errno.c
+++ b/libglusterfs/src/compat-errno.c
@@ -567,7 +567,7 @@ init_compat_errno_arrays ()
gf_error_to_errno_array[GF_ERROR_CODE_BADMACHO] = EBADMACHO;
gf_errno_to_error_array[EBADMACHO] = GF_ERROR_CODE_BADMACHO;
-#if 0
+#ifdef EDOOFUS
/* EDOOFUS 88 / * Programming error */
gf_error_to_errno_array[GF_ERROR_CODE_DOOFUS] = EDOOFUS;
gf_errno_to_error_array[EDOOFUS] = GF_ERROR_CODE_DOOFUS;
@@ -858,11 +858,11 @@ init_compat_errno_arrays ()
gf_error_to_errno_array[GF_ERROR_CODE_NOATTR] = ENOATTR;
gf_errno_to_error_array[ENOATTR] = GF_ERROR_CODE_NOATTR;
-#ifndef __NetBSD__ /* Undefined on NetBSD */
+#ifdef EDOOFUS
/* EDOOFUS 88 / * Programming error */
gf_error_to_errno_array[GF_ERROR_CODE_DOOFUS] = EDOOFUS;
gf_errno_to_error_array[EDOOFUS] = GF_ERROR_CODE_DOOFUS;
-#endif /* __NetBSD__ */
+#endif
/* EBADMSG 89 / * Bad message */
gf_error_to_errno_array[GF_ERROR_CODE_BADMSG] = EBADMSG;