Merge pull request #47 from Memphiz/win32fix3
[deb_libnfs.git] / lib / libnfs.c
index 402597ba241abf5a625a5a46d2ad2cfb89d278f0..ca8ed379de8d529a9f3609e419fc740f629c37d3 100644 (file)
@@ -1027,7 +1027,11 @@ static void nfs_stat_1_cb(struct rpc_context *rpc, int status, void *command_dat
        GETATTR3res *res;
        struct nfs_cb_data *data = private_data;
        struct nfs_context *nfs = data->nfs;
+#ifdef WIN32
+  struct __stat64 st;
+#else
        struct stat st;
+#endif
 
        assert(rpc->magic == RPC_CONTEXT_MAGIC);
 
@@ -2434,6 +2438,8 @@ static void nfs_opendir3_cb(struct rpc_context *rpc, int status, void *command_d
                        nfsdirent->mtime.tv_usec = attributes->mtime.nseconds/1000;
                        nfsdirent->ctime.tv_sec  = attributes->ctime.seconds;
                        nfsdirent->ctime.tv_usec = attributes->ctime.nseconds/1000;
+                       nfsdirent->uid = attributes->uid;
+                       nfsdirent->gid = attributes->gid;
                }
        }
 
@@ -2660,6 +2666,8 @@ static void nfs_opendir_cb(struct rpc_context *rpc, int status, void *command_da
                        nfsdirent->mtime.tv_usec = entry->name_attributes.post_op_attr_u.attributes.mtime.nseconds/1000;
                        nfsdirent->ctime.tv_sec  = entry->name_attributes.post_op_attr_u.attributes.ctime.seconds;
                        nfsdirent->ctime.tv_usec = entry->name_attributes.post_op_attr_u.attributes.ctime.nseconds/1000;
+                       nfsdirent->uid = entry->name_attributes.post_op_attr_u.attributes.uid;
+                       nfsdirent->gid = entry->name_attributes.post_op_attr_u.attributes.gid;
                }
 
                nfsdirent->next  = nfsdir->entries;