As pointed out by Eric Blake, using dirent->d_type breaks
compilation on MinGW. This patch addresses this by using
'#if defined' as same as doing for virCgroupForDriver.
---
src/util/cgroup.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 9fa64dc..024036a 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -608,6 +608,7 @@ cleanup:
}
#endif
+#if defined _DIRENT_HAVE_D_TYPE
static int virCgroupRemoveRecursively(char *grppath)
{
DIR *grpdir;
@@ -656,6 +657,13 @@ static int virCgroupRemoveRecursively(char *grppath)
return rc;
}
+#else
+static int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
+{
+ /* Claim no support */
+ return -ENXIO;
+}
+#endif
/**
* virCgroupRemove:
--
1.6.5.2