X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs.c;h=cd5a629805dfd3b3cd18b3952033562b7bbeedc6;hb=d7c6e9aaa9df593e951e2f19106dcc71102e74f1;hp=2f47ba8f4245a95d3161cac6b0578518ef10d2f2;hpb=4a2b08768a0d9ec9f5604da76f8e41263f20b821;p=deb_libnfs.git diff --git a/lib/libnfs.c b/lib/libnfs.c index 2f47ba8..cd5a629 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -21,11 +21,22 @@ #include "win32_compat.h" #define DllExport #else + #include -#include #include #include -#endif/*WIN32*/ + +#ifdef AROS +#include "aros_compat.h" +#else +#ifdef ANDROID +#include +#define statvfs statfs +#else +#include +#endif /*ANDROID*/ +#endif /*AROS*/ +#endif /*WIN32*/ #define _GNU_SOURCE @@ -38,6 +49,8 @@ #include #include #include +#include +#include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" #include "libnfs-raw-mount.h" @@ -112,7 +125,7 @@ struct nfs_mcb_data { static int nfs_lookup_path_async_internal(struct nfs_context *nfs, struct nfs_cb_data *data, struct nfs_fh3 *fh); -void nfs_set_auth(struct nfs_context *nfs, AUTH *auth) +void nfs_set_auth(struct nfs_context *nfs, struct AUTH *auth) { rpc_set_auth(nfs->rpc, auth); } @@ -2412,10 +2425,12 @@ static void nfs_statvfs_1_cb(struct rpc_context *rpc, int status, void *command_ svfs.f_bavail = res->FSSTAT3res_u.resok.abytes/4096; svfs.f_files = res->FSSTAT3res_u.resok.tfiles; svfs.f_ffree = res->FSSTAT3res_u.resok.ffiles; +#if !defined(ANDROID) svfs.f_favail = res->FSSTAT3res_u.resok.afiles; svfs.f_fsid = 0; svfs.f_flag = 0; svfs.f_namemax = 256; +#endif data->cb(0, nfs, &svfs, data->private_data); free_nfs_cb_data(data); @@ -3417,7 +3432,7 @@ uint64_t nfs_get_readmax(struct nfs_context *nfs) */ uint64_t nfs_get_writemax(struct nfs_context *nfs) { - /* Some XDR libraries can not marshall PDUs bigger than this */ + /* Some ZDR libraries can not marshall PDUs bigger than this */ if (nfs->writemax < 32768) { return nfs->writemax; }