On 09/07/2015 04:25 AM, Martin Kletzander wrote:
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(a)redhat.com>
---
src/util/virfile.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Ugh... Sorry about this one... Too bad there wasn't a way to have some
sort of make check rule - it wasn't the first and won't be the last time
<sigh> ;-)
John
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 408d2d912f13..75819d9c8bd7 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -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 */
/**