[win32] - fixed bad number casting when using libnfs on 64bit win8 systems - force...
[deb_libnfs.git] / lib / libnfs-sync.c
index 7de245f64531d90c3ee1bba65ad56641d7f99382..baadefa9962df6482ab938823b0da3a51d576c9d 100644 (file)
@@ -208,11 +208,18 @@ static void stat_cb(int status, struct nfs_context *nfs, void *data, void *priva
                nfs_set_error(nfs, "stat call failed with \"%s\"", (char *)data);
                return;
        }
-
-       memcpy(cb_data->return_data, data, sizeof(struct stat));
+#ifdef WIN32
+       memcpy(cb_data->return_data, data, sizeof(struct __stat64));
+#else
+  memcpy(cb_data->return_data, data, sizeof(struct stat));
+#endif
 }
 
+#ifdef WIN32
+int nfs_stat(struct nfs_context *nfs, const char *path, struct __stat64 *st)
+#else
 int nfs_stat(struct nfs_context *nfs, const char *path, struct stat *st)
+#endif
 {
        struct sync_cb_data cb_data;