diff options
author | agc <agc@pkgsrc.org> | 2004-09-15 16:33:38 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2004-09-15 16:33:38 +0000 |
commit | 69390463e17640009a98f34cf0bdb1adbfcda39c (patch) | |
tree | 8d694afd7d3370be31c3a19d8f295acf150e26d9 /ham/dpbox/patches | |
parent | 6856b6033b25f065e9032c3d948ddce5ed8cbbfe (diff) | |
download | pkgsrc-69390463e17640009a98f34cf0bdb1adbfcda39c.tar.gz |
Make this compile on NetBSD-2.0D and later with statvfs(2).
Diffstat (limited to 'ham/dpbox/patches')
-rw-r--r-- | ham/dpbox/patches/patch-af | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ham/dpbox/patches/patch-af b/ham/dpbox/patches/patch-af new file mode 100644 index 00000000000..0e694627d8b --- /dev/null +++ b/ham/dpbox/patches/patch-af @@ -0,0 +1,32 @@ +$NetBSD: patch-af,v 1.1 2004/09/15 16:33:38 agc Exp $ + +--- filesys.c 2004/09/15 16:24:57 1.1 ++++ filesys.c 2004/09/15 16:24:21 +@@ -401,6 +401,11 @@ + + #if defined(__linux__) || defined(__NetBSD__) + ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 200040000) ++#include <sys/statvfs.h> ++#endif ++ ++ + /* simply copied that widespread file access code of former dpbox code */ + /* in this single file. Not a real change to previous versions of the */ + /* code. lot of the code was written by Mark Wahl DL4YBG for the first */ +@@ -413,9 +418,15 @@ + + long DFree(char *mount) + { ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 200040000) + struct statfs mystatfs; + + statfs(mount, &mystatfs); ++#else ++ struct statvfs mystatfs; ++ ++ statvfs(mount, &mystatfs); ++#endif + if (mystatfs.f_bsize % 1024 == 0) + return (mystatfs.f_bsize / 1024) * mystatfs.f_bavail; + else |