summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
authorHarshavardhana Ranganath <harsha@dev.gluster.com>2009-05-19 06:39:42 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-05-19 21:04:02 +0530
commitc5b90f75951faddf55c61f2fe57f1c26070a63b6 (patch)
tree2c633ad11397d831bc704e8a9d857d2759f11bf4 /libglusterfsclient
parent35fc174ea3a37546d7c90be8fa6076b8f9416d73 (diff)
Appropriate changes to statvfs struct for Solaris host.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 7e850164416..a892f98f306 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -27,7 +27,11 @@
#include <stddef.h>
#include <sys/time.h>
+#include <sys/types.h>
#include <sys/stat.h>
+#ifdef GF_SOLARIS_HOST_OS
+#include <sys/statfs.h>
+#endif
#include <unistd.h>
#include <xlator.h>
#include <timer.h>
@@ -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: