pkgsrc/net/rdist6/patches/patch-af
abs 4e16ce597d Update freerdist to 0.92nb2
Defining STATFS_SVR4 sets the .h to use statsvfs(), which is fine, but it
probably helps if the .c file actually calls anything when STATFS_SVR4 is
defined. Fixes freespace being reported as zero in NetBSD 3.x and later.
2005-08-26 08:42:09 +00:00

20 lines
580 B
Text

$NetBSD: patch-af,v 1.3 2005/08/26 08:42:09 abs Exp $
--- src/filesys.c.orig 2005-08-26 09:30:21.000000000 +0100
+++ src/filesys.c
@@ -452,12 +452,10 @@ int getfilesysinfo(file, freespace, free
*/
#if STATFS_TYPE == STATFS_SYSV
r = statfs(mntpt, &statfsbuf, sizeof(statfs_t), 0);
-#endif
-#if STATFS_TYPE == STATFS_BSD || STATFS_TYPE == STATFS_44BSD
- r = statfs(mntpt, &statfsbuf);
-#endif
-#if STATFS_TYPE == STATFS_OSF1
+#elif STATFS_TYPE == STATFS_OSF1
r = statfs(mntpt, &statfsbuf, sizeof(statfs_t));
+#else
+ r = statfs(mntpt, &statfsbuf);
#endif
if (r < 0) {