aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-17 18:10:57 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-17 18:10:57 -0400
commit66344a3613cf12720585f9afa98d2422b699b9c8 (patch)
tree41a91d501b0be69dd20854df21c37a95ef5fb721
parent123766963e5fc2c073298c8b598334001075dfe3 (diff)
Enable diskfree on kfreebsd, using statvfs.
Could not reproduce the build failure I had seen related to this, but the numbers were wrong with statfs64. Probably pulling from the wrong place in the structure. statvfs seems to work..
-rw-r--r--Utility/libdiskfree.c14
-rw-r--r--debian/changelog1
2 files changed, 4 insertions, 11 deletions
diff --git a/Utility/libdiskfree.c b/Utility/libdiskfree.c
index a37cb7571..5e84d4bde 100644
--- a/Utility/libdiskfree.c
+++ b/Utility/libdiskfree.c
@@ -22,16 +22,9 @@
# define STATCALL statfs /* statfs64 not yet tested on a real FreeBSD machine */
# define STATSTRUCT statfs
#else
-#if defined (__FreeBSD_kernel__) /* Debian kFreeBSD */
-# include <sys/param.h>
-# include <sys/mount.h>
-# define STATCALL statfs64
-# define STATSTRUCT statfs
-# warning free space checking code temporarily disabled due to build failure
-# define UNKNOWN
-#else
-#if defined (__linux__)
-/* This is a POSIX standard, so might also work elsewhere. */
+#if defined (__linux__) || defined (__FreeBSD_kernel__)
+/* Linux or Debian kFreeBSD */
+/* This is a POSIX standard, so might also work elsewhere too. */
# include <sys/statvfs.h>
# define STATCALL statvfs
# define STATSTRUCT statvfs
@@ -41,7 +34,6 @@
#endif
#endif
#endif
-#endif
#include <errno.h>
#include <stdio.h>
diff --git a/debian/changelog b/debian/changelog
index 366854156..9a47447ce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ git-annex (3.20120616) UNRELEASED; urgency=low
* watch: New subcommand, which uses inotify to watch for changes to
files and automatically annexes new files, etc, so you don't need
to manually run git commands when manipulating files.
+ * Enable diskfree on kfreebsd, using statvfs.
-- Joey Hess <joeyh@debian.org> Tue, 12 Jun 2012 11:35:59 -0400