Make this build again on older NetBSD systems, without statvfs().

This commit is contained in:
fredb 2004-05-09 22:04:30 +00:00
parent 844b08fcd4
commit d9f6c2d9cb
2 changed files with 8 additions and 5 deletions

View file

@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.21 2004/05/09 20:32:10 fredb Exp $
$NetBSD: distinfo,v 1.22 2004/05/09 22:04:30 fredb Exp $
SHA1 (gkrellm-2.1.28.tar.bz2) = 3c02b156b1218ba6d164ec652b4dec47f33f88b4
Size (gkrellm-2.1.28.tar.bz2) = 633487 bytes
SHA1 (patch-aa) = 92a1b4c6e290bd13fa4cad2c3da39cc7d335c7ee
SHA1 (patch-aa) = 6335a5cb00a535c34c35fad47db077cb8db51dfe

View file

@ -1,4 +1,4 @@
$NetBSD: patch-aa,v 1.12 2004/05/09 20:32:10 fredb Exp $
$NetBSD: patch-aa,v 1.13 2004/05/09 22:04:30 fredb Exp $
--- src/sysdeps/bsd-common.c.orig 2004-01-13 13:32:34.000000000 -0600
+++ src/sysdeps/bsd-common.c
@ -14,7 +14,7 @@ $NetBSD: patch-aa,v 1.12 2004/05/09 20:32:10 fredb Exp $
gint mntsize, i;
if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0)
@@ -281,12 +285,20 @@
@@ -281,12 +285,24 @@
void
gkrellm_sys_fs_get_fsusage(gpointer fs, gchar *dir)
{
@ -31,8 +31,11 @@ $NetBSD: patch-aa,v 1.12 2004/05/09 20:32:10 fredb Exp $
+#endif
gkrellm_fs_assign_fsusage_data(fs,
(glong) st.f_blocks, (glong) st.f_bavail,
- (glong) st.f_bfree, (glong) st.f_bsize);
+#if (defined(__NetBSD__) && __NetBSD_Version__ >= 200040000) /* NetBSD 2.0D */
+ (glong) st.f_bfree, (glong) st.f_frsize);
+#else
(glong) st.f_bfree, (glong) st.f_bsize);
+#endif
else
gkrellm_fs_assign_fsusage_data(fs, 0, 0, 0, 0);
}