summaryrefslogtreecommitdiff
path: root/filesystems/fuse/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'filesystems/fuse/patches/patch-af')
-rw-r--r--filesystems/fuse/patches/patch-af42
1 files changed, 42 insertions, 0 deletions
diff --git a/filesystems/fuse/patches/patch-af b/filesystems/fuse/patches/patch-af
new file mode 100644
index 00000000000..8dd53b5a16d
--- /dev/null
+++ b/filesystems/fuse/patches/patch-af
@@ -0,0 +1,42 @@
+$NetBSD: patch-af,v 1.1 2010/08/25 08:02:21 manu Exp $
+
+Do not check for inexistant /etc/mtab on NetBSD. Also remap umount2() to
+unmount(2).
+--- lib/mount_util.c.orig 2010-08-24 09:44:43.000000000 +0200
++++ lib/mount_util.c 2010-08-24 09:48:40.000000000 +0200
+@@ -10,18 +10,25 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <signal.h>
+ #include <dirent.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#ifndef __NetBSD__
+ #include <mntent.h>
++#endif
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/mount.h>
+ #include <sys/param.h>
+
++#ifdef __NetBSD__
++#define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0)
++#define mtab_needs_update(mnt) 0
++#else
+ static int mtab_needs_update(const char *mnt)
+ {
+ int res;
+ struct stat stbuf;
+@@ -52,8 +59,9 @@
+ }
+
+ return 1;
+ }
++#endif /* __NetBSD__ */
+
+ static int add_mount_legacy(const char *progname, const char *fsname,
+ const char *mnt, const char *type, const char *opts)
+ {