From c5b90f75951faddf55c61f2fe57f1c26070a63b6 Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Tue, 19 May 2009 06:39:42 -0700 Subject: Appropriate changes to statvfs struct for Solaris host. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libglusterfsclient/src') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 7e8501644..a892f98f3 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -27,7 +27,11 @@ #include #include +#include #include +#ifdef GF_SOLARIS_HOST_OS +#include +#endif #include #include #include @@ -5156,6 +5160,14 @@ glusterfs_glh_statfs (glusterfs_handle_t handle, const char *path, op_ret = libgf_client_statvfs (ctx, &loc, &stvfs); if (op_ret == 0) { +#ifdef GF_SOLARIS_HOST_OS + buf->f_fstyp = 0; + buf->f_bsize = stvfs.f_bsize; + buf->f_blocks = stvfs.f_blocks; + buf->f_bfree = stvfs.f_bfree; + buf->f_files = stvfs.f_bavail; + buf->f_ffree = stvfs.f_ffree; +#else buf->f_type = 0; buf->f_bsize = stvfs.f_bsize; buf->f_blocks = stvfs.f_blocks; @@ -5172,6 +5184,7 @@ glusterfs_glh_statfs (glusterfs_handle_t handle, const char *path, */ memcpy (&buf->f_fsid, &stvfs.f_fsid, sizeof (stvfs.f_fsid)); buf->f_namelen = stvfs.f_namemax; +#endif } out: -- cgit