X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs-sync.c;h=baadefa9962df6482ab938823b0da3a51d576c9d;hb=be184101ca7251c15184e6af3880680018011e32;hp=f2c9ebf481387dd8cdd2c39dde00347f58dae8c2;hpb=00748f36c57324ccc2cb21ac9af45d15821cf675;p=deb_libnfs.git diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index f2c9ebf..baadefa 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -21,39 +21,58 @@ #include "config.h" #endif +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" -#else -#include -#include -#include +#endif + +#ifdef HAVE_NET_IF_H #include +#endif -#ifdef AROS -#include "aros_compat.h" -#else #ifdef ANDROID -#include -#include #define statvfs statfs -#else +#endif + +#ifdef HAVE_SYS_VFS_H +#include +#endif + +#ifdef HAVE_SYS_STATVFS_H #include -#endif /*ANDRIOD*/ -#endif /*AROS*/ -#endif /*WIN32*/ +#endif #ifdef HAVE_SYS_IOCTL_H #include #endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + #ifdef HAVE_POLL_H #include #endif +#ifdef HAVE_NETDB_H +#include +#endif + #ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_STRINGS_H +#include +#endif + #include #include #include @@ -189,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;