summaryrefslogtreecommitdiff
path: root/misc/vfu/patches/patch-ah
blob: b7255bed2e07643a64ce0f0ecd032af1fe356a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ah,v 1.3 2004/05/24 09:10:06 adam Exp $

--- vfu/vfucopy.cpp.orig	2004-05-24 10:52:29.000000000 +0000
+++ vfu/vfucopy.cpp
@@ -30,9 +30,15 @@ int ignore_copy_errors = 0; /* actually 
 fsize_t device_free_space( const char *target ) /* user free space, NOT real! */
 {
   char t[MAX_PATH];
+#ifdef _SYS_STATVFS_H_
+  struct statvfs stafs;
+  str_file_path( target, t );
+  statvfs( t, &stafs );
+#else
   struct statfs stafs;
   str_file_path( target, t );
   statfs( t, &stafs );
+#endif
   return ((fsize_t)(stafs.f_bsize)) * stafs.f_bfree;
 };