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.
This commit is contained in:
Ryota Ozaki 2010-06-30 20:49:28 +09:00 committed by Eric Blake
parent 8919b4d425
commit 29da015aac

View File

@ -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)
return rc; return rc;
} }
#else
static int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
{
/* Claim no support */
return -ENXIO;
}
#endif
/** /**
* virCgroupRemove: * virCgroupRemove: