win32 oncrpc environment needx xdr.h before including auth.h
[deb_libnfs.git] / lib / libnfs.c
index 0538bfd09d253595481f0f30e839298d945da916..5fd91ea03e6379ea55e246ef2396976bb1f8444a 100644 (file)
  */
 
 #define _GNU_SOURCE
+
+#if defined(WIN32)
+#include <winsock2.h>
+#define DllExport
+#define O_SYNC 0
+typedef int uid_t;
+typedef int gid_t;
+#else
+#include <strings.h>
+#include <sys/statvfs.h>
+#include <utime.h>
+#include <unistd.h>
+#endif
+
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/statvfs.h>
-#include <utime.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
@@ -2889,11 +2899,11 @@ void nfs_set_error(struct nfs_context *nfs, char *error_string, ...)
        char *str = NULL;
 
         va_start(ap, error_string);
-       vasprintf(&str, error_string, ap);
-       if (nfs->rpc->error_string != NULL) {
-               free(nfs->rpc->error_string);
-       }
-       nfs->rpc->error_string = str;
+       //      vasprintf(&str, error_string, ap);
+       //      if (nfs->rpc->error_string != NULL) {
+       //      free(nfs->rpc->error_string);
+       //}
+       //nfs->rpc->error_string = str;
         va_end(ap);
 }