From 70e25ea74e011d73887f4f66842b204fb4504c97 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Sun, 11 Nov 2018 18:31:15 +0400 Subject: Fix build on non-Linux * Update meson.build to add mount_util.c to libfuse_sources unconditionally, it's non Linux-only * FreeBSD, like NetBSD, doesn't have mntent.h, so don't include that and define IGNORE_MTAB for both * FreeBSD, like NetBSD, has no umount2() sysctl, so similarly define it to unmount() --- lib/mount_util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/mount_util.c') diff --git a/lib/mount_util.c b/lib/mount_util.c index 95e038f..48324c8 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -20,15 +20,17 @@ #include #include #include -#ifndef __NetBSD__ +#if !defined( __NetBSD__) && !defined(__FreeBSD__) #include +#else +#define IGNORE_MTAB #endif #include #include #include #include -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(__FreeBSD__) #define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0) #endif -- cgit v1.2.3