mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: Add win32 version of virFileUnlink
Commit 35847860f65f Added the virFileUnlink function, but failed to add a version for mingw build, causing the following error: Cannot export virFileUnlink: symbol not defined Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
83ae3ee39b
commit
26893ac6e0
@ -2637,6 +2637,20 @@ virDirCreate(const char *path ATTRIBUTE_UNUSED,
|
||||
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
int
|
||||
virFileUnlink(const char *path,
|
||||
uid_t uid ATTRIBUTE_UNUSED,
|
||||
gid_t gid ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (unlink(path) < 0) {
|
||||
virReportSystemError(errno, _("Unable to unlink path '%s'"),
|
||||
path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user