@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include <dirent.h>
+#include <glib/gstdio.h>
#include "qapi/error.h"
#include "block/block_int.h"
#include "block/qdict.h"
@@ -2726,13 +2727,9 @@ static int handle_renames_and_mkdirs(BDRVVVFATState* s)
mapping_t* mapping;
int j, parent_path_len;
-#ifdef __MINGW32__
- if (mkdir(commit->path))
+ if (g_mkdir(commit->path, 0755)) {
return -5;
-#else
- if (mkdir(commit->path, 0755))
- return -5;
-#endif
+ }
mapping = insert_mapping(s, commit->param.mkdir.cluster,
commit->param.mkdir.cluster + 1);