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
if test "$enable_test" != "no"; then
subdirs2="$subdirs2 test";
fi
-if test "$enable_mtab" = "no"; then
+if test "$enable_mtab" = "no" -o \
+ "$arch" = "netbsd"; then
AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
fi
goto out_close;
}
-#ifndef __NetBSD__
#ifndef IGNORE_MTAB
if (geteuid() == 0) {
char *newmnt = fuse_mnt_resolve_path("fuse", mnt);
goto out_umount;
}
#endif /* IGNORE_MTAB */
-#endif /* __NetBSD__ */
free(type);
free(source);
#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)
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)