virtio-9p: fix compilation errors on Windows 24/25324/2
authorKitae Kim <kt920.kim@samsung.com>
Mon, 4 Aug 2014 02:16:38 +0000 (11:16 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Mon, 4 Aug 2014 05:46:25 +0000 (14:46 +0900)
Change-Id: I568a19ba46e8f0c9b9c92ef8c3e82ff294c02ff9
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
hw/9pfs/virtio-9p-local-maru.c
qga/channel-win32.c

index 5ca2d15b4f6e63782488a288680ed96ef2ad4614..6b001041be68b0b1b1707412f7e505bc77ddb13f 100644 (file)
@@ -250,7 +250,7 @@ err_out:
         GetDiskFreeSpace(RootPathName, NULL, &BytesPerSector, NULL, NULL);
         hostBytesPerSector = BytesPerSector;
     }
-    err = _stat(pathname, stbuf);
+    err = stat(pathname, stbuf);
 
     /* Modify the permission to 777 except the directories. */
     stbuf->st_mode = stbuf->st_mode | 0777;
@@ -1313,7 +1313,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path,
         gettimeofday(&tv_now, NULL);
     }
     if (buf[0].tv_nsec == UTIME_OMIT || buf[1].tv_nsec == UTIME_OMIT) {
-        _stat(r_path, &st);
+        stat(r_path, &st);
     }
 
     for (i = 0; i < 2; i++) {
@@ -1345,7 +1345,7 @@ static int local_remove(FsContext *ctx, const char *path)
 #ifndef CONFIG_WIN32
         err =  lstat(buffer, &stbuf);
 #else
-        err = _stat(buffer, &stbuf);
+        err = stat(buffer, &stbuf);
 #endif
         g_free(buffer);
         if (err) {
index 0d5e5f511f0271d05774e2539a18e0332f9fa266..da95e123e511e4d313672f7dc3d766f8154ff51e 100644 (file)
@@ -270,6 +270,9 @@ GIOStatus ga_channel_write_all(GAChannel *c, const char *buf, size_t size)
 {
     GIOStatus status = G_IO_STATUS_NORMAL;
     size_t count;
+#ifdef CONFIG_MARU
+    count = 0;
+#endif
 
     while (size) {
         status = ga_channel_write(c, buf, size, &count);