X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs-sync.c;h=c7698351148f502e735e581e08d0c696c990a358;hb=a8a1b85846aab042cd410bf59caf617a0951380e;hp=6f73a7e78e66a64223d975fcb636e6ad16412c38;hpb=4b1097cde2eca9366c833805a529c23f7a7b02d6;p=deb_libnfs.git diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 6f73a7e..c769835 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -17,9 +17,8 @@ /* * High level api to nfs filesystems */ - -#if defined (WIN32) -#include +#ifdef WIN32 +#include "win32_compat.h" #define DllExport #else #include @@ -43,9 +42,13 @@ #include #include #include + #ifdef HAVE_SYS_SOCKIO_H #include #endif + +#include +#include #include "libnfs.h" #include "libnfs-raw.h" #include "libnfs-raw-mount.h" @@ -713,8 +716,11 @@ static void statvfs_cb(int status, struct nfs_context *nfs, void *data, void *pr nfs_set_error(nfs, "statvfs call failed with \"%s\"", (char *)data); return; } - +#ifndef WIN32 memcpy(cb_data->return_data, data, sizeof(struct statvfs)); +#else + cb_data->return_data=NULL; +#endif/**/ } int nfs_statvfs(struct nfs_context *nfs, const char *path, struct statvfs *svfs) @@ -1254,6 +1260,7 @@ void callit_cb(struct rpc_context *rpc, int status, void *data _U_, void *privat srv_data->srvrs = srvr; } +#ifndef WIN32 static int send_nfsd_probes(struct rpc_context *rpc, struct ifconf *ifc, struct nfs_list_data *data) { char *ptr; @@ -1305,11 +1312,13 @@ static int send_nfsd_probes(struct rpc_context *rpc, struct ifconf *ifc, struct return 0; } +#endif/*WIN32 TODO implement this with win32api FIXME*/ struct nfs_server_list *nfs_find_local_servers(void) { struct rpc_context *rpc; struct nfs_list_data data = {0, NULL}; +#ifndef WIN32 struct timeval tv_start, tv_current; struct ifconf ifc; int size, loop; @@ -1386,7 +1395,7 @@ struct nfs_server_list *nfs_find_local_servers(void) free_nfs_srvr_list(data.srvrs); return NULL; } - +#endif/*WIN32 - FIXME redef it when send_nfsd_probes is implemented for win32*/ return data.srvrs; } #endif