summaryrefslogtreecommitdiff
path: root/ham/dpbox/patches/patch-af
blob: f6c7bff2abe7610e8f78ae85b8ea1cdf12b0fdd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-af,v 1.2 2004/09/18 15:45:13 wiz 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