提交 29da015a 编写于 作者: R Ryota Ozaki 提交者: Eric Blake

cgroup: Fix compilation broken on MinGW due to dirent->d_type

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.
上级 8919b4d4
...@@ -608,6 +608,7 @@ cleanup: ...@@ -608,6 +608,7 @@ cleanup:
} }
#endif #endif
#if defined _DIRENT_HAVE_D_TYPE
static int virCgroupRemoveRecursively(char *grppath) static int virCgroupRemoveRecursively(char *grppath)
{ {
DIR *grpdir; DIR *grpdir;
...@@ -656,6 +657,13 @@ static int virCgroupRemoveRecursively(char *grppath) ...@@ -656,6 +657,13 @@ static int virCgroupRemoveRecursively(char *grppath)
return rc; return rc;
} }
#else
static int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
{
/* Claim no support */
return -ENXIO;
}
#endif
/** /**
* virCgroupRemove: * virCgroupRemove:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册