diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2010-08-27 17:16:54 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-08-27 17:16:54 +0200 |
commit | 64222fbcbd3ed227e4f9c68e1acccd7e68218982 (patch) | |
tree | 7fd0ce19a909ee39f741e50732f1f97cffe21f22 /lib/mount_util.c | |
parent | 7cc73a47ddbc25666f0fba1872099eb3245ba25e (diff) | |
download | fuse-64222fbcbd3ed227e4f9c68e1acccd7e68218982.tar.gz |
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
Diffstat (limited to 'lib/mount_util.c')
-rw-r--r-- | lib/mount_util.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 <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; @@ -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) |