[droid] Support building for android
These are the changes necessary to build for android. Working status is yet untested.libnfs-4.0.0-vitalif
parent
db0c9f4212
commit
252aa90dc8
|
@ -18,6 +18,9 @@
|
|||
* This is the highlevel interface to access NFS resources using a posix-like interface
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#if defined(ANDROID)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
struct nfs_context;
|
||||
struct rpc_context;
|
||||
|
|
|
@ -23,7 +23,13 @@
|
|||
#else
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#ifndef ANDROID
|
||||
#include <sys/statvfs.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <sys/vfs.h>
|
||||
#define statvfs statfs
|
||||
#endif
|
||||
#include <poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netdb.h>
|
||||
|
|
|
@ -22,7 +22,12 @@
|
|||
#define DllExport
|
||||
#else
|
||||
#include <strings.h>
|
||||
#ifndef ANDROID
|
||||
#include <sys/statvfs.h>
|
||||
#else
|
||||
#include <sys/vfs.h>
|
||||
#define statvfs statfs
|
||||
#endif
|
||||
#include <utime.h>
|
||||
#include <unistd.h>
|
||||
#endif/*WIN32*/
|
||||
|
@ -2414,10 +2419,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);
|
||||
|
|
|
@ -18,6 +18,11 @@ extern "C" {
|
|||
#define NFS3_CREATEVERFSIZE 8
|
||||
#define NFS3_COOKIEVERFSIZE 8
|
||||
|
||||
#if defined(ANDROID)
|
||||
typedef long long int quad_t;
|
||||
typedef long long unsigned u_quad_t;
|
||||
#endif
|
||||
|
||||
typedef char cookieverf3[NFS3_COOKIEVERFSIZE];
|
||||
|
||||
typedef u_quad_t uint64;
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
typedef long long int quad_t;
|
||||
typedef long long unsigned u_quad_t;
|
||||
#endif
|
||||
|
||||
struct nlm_fh4 {
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue