From 26872fdda04341f6490355ad97c1731f0a70fd13 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 22 May 2009 10:16:01 -0700 Subject: [PATCH] rid -Wall statvfs warning on solaris 8 --- src/sigar_fileinfo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sigar_fileinfo.c b/src/sigar_fileinfo.c index a7567459..b7dd11ff 100644 --- a/src/sigar_fileinfo.c +++ b/src/sigar_fileinfo.c @@ -75,8 +75,15 @@ int sigar_statvfs(sigar_t *sigar, { struct statvfs buf; sigar_uint64_t val, bsize; + int status = +#if defined(__sun) && !defined(_LP64) + /* http://bugs.opensolaris.org/view_bug.do?bug_id=4462986 */ + statvfs(dirname, (void *)&buf); +#else + statvfs(dirname, &buf); +#endif - if (statvfs(dirname, &buf) != 0) { + if (status != 0) { return errno; }