From 64222fbcbd3ed227e4f9c68e1acccd7e68218982 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 27 Aug 2010 17:16:54 +0200 Subject: Add NetBSD support The bulk of it is just about adding ifdef __NetBSD__ where there is already an ifdef __FreeBSD__ Add a arch=netbsd to deal with NetBSD specifics. I suggests that arch=bsd could be renamed to arch=freebsd NetBSD specific linking with -lperfuse NetBSD patches to lib/mount.c. It turned to be less itrusive to patch mount;c than mount_bsd.c. I suggest mount_bsd.c could be renamed to mount_freebsd.c Patch from Emmanuel Dreyfus --- lib/mount_util.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/mount_util.c') diff --git a/lib/mount_util.c b/lib/mount_util.c index 33e6697..9926fe8 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -11,16 +11,23 @@ #include #include #include +#include #include #include #include #include +#ifndef __NetBSD__ #include +#endif #include #include #include #include +#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; @@ -53,6 +60,7 @@ static int mtab_needs_update(const char *mnt) return 1; } +#endif /* __NetBSD__ */ static int add_mount_legacy(const char *progname, const char *fsname, const char *mnt, const char *type, const char *opts) -- cgit v1.2.3