mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
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:
parent
8919b4d425
commit
29da015aac
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user