diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-10-19 17:09:06 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-10-19 17:09:06 -0400 |
commit | 091dccb70fd5a99f951c46386ee7ee0cef737666 (patch) | |
tree | 08027a17bbfaf6e00d7c6a8d7d94b0021f21af0c | |
parent | 3b3b77daed7af7072314ecd5328e2a684b966ca8 (diff) |
Use statvfs on OSX.
Fixes a recent-ish build warning on about 64 bit vs non.
This is the method used by the disk-free-space library, and I tested it to
yield the same results on even 10 tb drives on OSX -- so it's getting 64
bit values.
-rw-r--r-- | Utility/libdiskfree.c | 13 | ||||
-rw-r--r-- | debian/changelog | 6 |
2 files changed, 8 insertions, 11 deletions
diff --git a/Utility/libdiskfree.c b/Utility/libdiskfree.c index 12d70e259..a682bb3bd 100644 --- a/Utility/libdiskfree.c +++ b/Utility/libdiskfree.c @@ -7,14 +7,6 @@ /* Include appropriate headers for the OS, and define what will be used to * check the free space. */ -#if defined(__APPLE__) -# define _DARWIN_FEATURE_64_BIT_INODE 1 -# include <sys/param.h> -# 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> @@ -26,8 +18,8 @@ # warning free space checking code not available for Android # define UNKNOWN #else -#if defined (__linux__) || defined (__FreeBSD_kernel__) || (defined (__SVR4) && defined (__sun)) -/* Linux or Debian kFreeBSD or Solaris */ +#if defined (__linux__) || defined (__APPLE__) || defined (__FreeBSD_kernel__) || (defined (__SVR4) && defined (__sun)) +/* Linux or OSX or Debian kFreeBSD or Solaris */ /* This is a POSIX standard, so might also work elsewhere too. */ # include <sys/statvfs.h> # define STATCALL statvfs @@ -39,7 +31,6 @@ #endif #endif #endif -#endif #include <errno.h> #include <stdio.h> diff --git a/debian/changelog b/debian/changelog index 54093dd1d..9d768ad28 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (5.20151020) UNRELEASED; urgency=medium + + * Use statvfs on OSX. + + -- Joey Hess <id@joeyh.name> Mon, 19 Oct 2015 17:00:21 -0400 + git-annex (5.20151019) unstable; urgency=medium * Fix a longstanding, but unlikely to occur bug, where dropping |