Add support for buildin under DragonFly BSD
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 14 Jan 2019 20:28:41 +0000 (05:28 +0900)
committerNikolaus Rath <Nikolaus@rath.org>
Mon, 14 Jan 2019 20:28:41 +0000 (20:28 +0000)
70e25ea74e("Fix build on non-Linux") broke build on DragonFly BSD,
or likely anything other than FreeBSD and NetBSD that is not Linux.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
lib/mount_util.c

index 48324c8a51bdfe3576bcc48e73343577941e82e5..f1d23255bda54997c5dfeb6590b0f369ce3aa1f4 100644 (file)
@@ -20,7 +20,7 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <paths.h>
-#if !defined( __NetBSD__) && !defined(__FreeBSD__)
+#if !defined( __NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
 #include <mntent.h>
 #else
 #define IGNORE_MTAB
@@ -30,8 +30,8 @@
 #include <sys/mount.h>
 #include <sys/param.h>
 
-#if defined(__NetBSD__) || defined(__FreeBSD__)
-#define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#define umount2(mnt, flags) unmount(mnt, ((flags) == 2) ? MNT_FORCE : 0)
 #endif
 
 #ifdef IGNORE_MTAB