Skip to contentSkip to conversation

Compile fix for win32

Qemu-devel Kazu 2 participants 2 messages Dec 19, 2005

lore
Share & tools
lore

Kazu

author
#0 lore raw

Hi,

It is comile fix for win32.

Regards,
Kazu

Index: block-vvfat.c
===================================================================
RCS file: /sources/qemu/qemu/block-vvfat.c,v
retrieving revision 1.3

block-vvfat.c 19 Dec 2005 06:23:15 -0000 renamed from block-vvfat.c 18 Dec 2005 18:29:50 -0000 1.3 +5 -0
diff -u -r1.3 block-vvfat.c
@@ -2351,8 +2351,13 @@
     mapping_t* mapping;
     int j, parent_path_len;
 
+#ifdef _WIN32
+        if (mkdir(commit->path))
+            return -5;
+#else
     if (mkdir(commit->path, 0755))
  return -5;
+#endif
 
     mapping = insert_mapping(s, commit->param.mkdir.cluster,
      commit->param.mkdir.cluster + 1);
#1 lore raw

Hi,

Quoted 1 line · Kazu

It is comile fix for win32.

Sorry... I "fixed" the headers of my installation. I think that MinGW should be fixed, really. Everybody passes down a mode when creating a directory.

But you're correct, as long as they don't get their act together, we should work around it. See below for my (shorter) patch.

Ciao,
Dscho

block-vvfat.c +4 -0
index b73a6f6..991635d 100644
@@ -2351,7 +2351,11 @@ static int handle_renames_and_mkdirs(BDR
            mapping_t* mapping;
            int j, parent_path_len;
 
+#ifdef __MINGW32__
+           if (mkdir(commit->path))
+#else
            if (mkdir(commit->path, 0755))
+#endif
                return -5;
 
            mapping = insert_mapping(s, commit->param.mkdir.cluster,