From 50b2a2375ad0eb26974039647fc705a32b10ac55 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 15 Dec 2016 16:06:15 +0100 Subject: [PATCH] virfile: Support bind mount only on linux Other systems (despite having sys/mount.h) do not support bind mounts. Signed-off-by: Michal Privoznik --- src/util/virfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 7c1e4357df..718dcc4a98 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3565,7 +3565,7 @@ int virFileIsSharedFS(const char *path) } -#if defined(HAVE_SYS_MOUNT_H) +#if defined(__linux__) && defined(HAVE_SYS_MOUNT_H) int virFileSetupDev(const char *path, const char *mount_options) @@ -3611,7 +3611,7 @@ virFileBindMountDevice(const char *src, return 0; } -#else /* !defined(HAVE_SYS_MOUNT_H) */ +#else /* !defined(__linux__) || !defined(HAVE_SYS_MOUNT_H) */ int virFileSetupDev(const char *path ATTRIBUTE_UNUSED, @@ -3631,7 +3631,7 @@ virFileBindMountDevice(const char *src ATTRIBUTE_UNUSED, _("mount is not supported on this platform.")); return -1; } -#endif /* !defined(HAVE_SYS_MOUNT_H) */ +#endif /* !defined(__linux__) || !defined(HAVE_SYS_MOUNT_H) */ #if defined(HAVE_SYS_ACL_H) -- 2.47.2