Files
pkgsrc-ng/filesystems/fuse/patches/patch-af
2013-09-26 17:14:40 +02:00

43 lines
1.0 KiB
Plaintext

$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)
{