diff options
-rw-r--r-- | Utility/libdiskfree.c | 9 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Utility/libdiskfree.c b/Utility/libdiskfree.c index c2f8368f0..12d70e259 100644 --- a/Utility/libdiskfree.c +++ b/Utility/libdiskfree.c @@ -13,23 +13,26 @@ # include <sys/mount.h> # define STATCALL statfs # define STATSTRUCT statfs64 +# define BSIZE f_bsize #else #if defined (__FreeBSD__) # include <sys/param.h> # include <sys/mount.h> # define STATCALL statfs /* statfs64 not yet tested on a real FreeBSD machine */ # define STATSTRUCT statfs +# define BSIZE f_bsize #else #if defined __ANDROID__ # warning free space checking code not available for Android # define UNKNOWN #else -#if defined (__linux__) || defined (__FreeBSD_kernel__) -/* Linux or Debian kFreeBSD */ +#if defined (__linux__) || defined (__FreeBSD_kernel__) || (defined (__SVR4) && defined (__sun)) +/* Linux or Debian kFreeBSD or Solaris */ /* This is a POSIX standard, so might also work elsewhere too. */ # include <sys/statvfs.h> # define STATCALL statvfs # define STATSTRUCT statvfs +# define BSIZE f_frsize #else # warning free space checking code not available for this OS # define UNKNOWN @@ -65,7 +68,7 @@ unsigned long long int get(const char *path, int req) { v = 0; } - blocksize = buf.f_bsize; + blocksize = buf.BSIZE; return v * blocksize; #endif } diff --git a/debian/changelog b/debian/changelog index 5664e748b..57db377df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ git-annex (5.20150931) UNRELEASED; urgency=medium * reinject: Already verified content; this can now be disabled by setting annex.verify=false. * Allow building with S3 disabled again. + * Ported disk free space checking code to work on Solaris. -- Joey Hess <id@joeyh.name> Thu, 01 Oct 2015 12:42:56 -0400 |