#ifdef WIN32
#include "win32_compat.h"
-#else
-#include <strings.h>
+#endif
+
+#ifdef HAVE_UTIME_H
#include <utime.h>
-#endif /*WIN32*/
+#endif
#ifdef ANDROID
#define statvfs statfs
#include <sys/statvfs.h>
#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <netinet/in.h>
#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
}
memset(nfsfh, 0, sizeof(struct nfsfh));
- /* steal the filehandle */
- nfsfh->fh.data.data_len = data->fh.data.data_len;
- nfsfh->fh.data.data_val = data->fh.data.data_val;
- data->fh.data.data_val = NULL;
+ /* copy the filehandle */
+ nfsfh->fh.data.data_len = res->LOOKUP3res_u.resok.object.data.data_len;
+ nfsfh->fh.data.data_val = malloc(nfsfh->fh.data.data_len);
+ memcpy(nfsfh->fh.data.data_val, res->LOOKUP3res_u.resok.object.data.data_val, nfsfh->fh.data.data_len);
data->cb(0, nfs, nfsfh, data->private_data);
free_nfs_cb_data(data);
/*
* Async utime()
*/
+#ifdef HAVE_UTIME_H
int nfs_utime_async(struct nfs_context *nfs, const char *path, struct utimbuf *times, nfs_cb cb, void *private_data)
{
struct timeval *new_times = NULL;
return 0;
}
-
-
-
+#endif
/*