From ac25c153691faea65cbfc1b0781b8b0dab3f4b29 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Fri, 23 Dec 2016 18:47:01 -0800 Subject: Set IGNORE_MTAB when running under NetBSD Apparently, NetBSD does not have /etc/mtab. Setting IGNORE_MTAB in this case makes the code a little nicer. See also https://github.com/libfuse/libfuse/pull/123 --- lib/mount_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/mount_util.c') diff --git a/lib/mount_util.c b/lib/mount_util.c index 8b64ca2..56ed85a 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -30,6 +30,9 @@ #ifdef __NetBSD__ #define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0) +#endif + +#ifdef IGNORE_MTAB #define mtab_needs_update(mnt) 0 #else static int mtab_needs_update(const char *mnt) @@ -75,7 +78,7 @@ static int mtab_needs_update(const char *mnt) return 1; } -#endif /* __NetBSD__ */ +#endif /* IGNORE_MTAB */ static int add_mount(const char *progname, const char *fsname, const char *mnt, const char *type, const char *opts) -- cgit v1.2.3