WIN32 fixes
[deb_libnfs.git] / lib / libnfs-zdr.c
index a243d1d1a7447b5a4ffc5169d60df6128ca7beb4..e904df9bf356fc28584de07808bc35cc17b15d7f 100644 (file)
@@ -23,6 +23,7 @@
 #ifdef WIN32
 #include "win32_compat.h"
 #else
+#include <sys/types.h>
 #include <arpa/inet.h>
 #endif/*WIN32*/
 
@@ -503,7 +504,11 @@ struct AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint
 
 struct AUTH *libnfs_authunix_create_default(void)
 {
-       return libnfs_authunix_create("libnfs", getuid(), -1, 0, NULL);
+#ifdef WIN32
+       return libnfs_authunix_create("libnfs", 65535, 65535, 0, NULL);
+#else
+       return libnfs_authunix_create("libnfs", getuid(), getgid(), 0, NULL);
+#endif
 }
 
 void libnfs_auth_destroy(struct AUTH *auth)