summaryrefslogtreecommitdiff
path: root/audio/snd/patches/patch-ah
blob: 718e15310b91292b2968832c2ad7b45c808cd5cd (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
$NetBSD: patch-ah,v 1.4 2005/09/06 08:10:57 abs Exp $

--- snd-file.c.orig	1998-02-10 08:42:41.000000000 -0600
+++ snd-file.c
@@ -15,6 +15,14 @@
   #include <sys/vfs.h>
 #endif
 
+#if defined (__NetBSD__)
+  #include <sys/param.h>
+  #include <sys/mount.h>
+  #if (__NetBSD_Version__ >= 299000900) /* NetBSD 2.99.9 */
+    #define statfs statvfs
+  #endif
+#endif
+
 #ifdef BEOS
 int disk_kspace (int fd) {return(1234567);}
 time_t file_write_date(char *filename) {return(1234567);}
@@ -26,7 +34,7 @@ int disk_kspace (int fd)
 #if defined(SGI) || defined(SCO5) || defined(UW2) || defined(SOLARIS)
   err = fstatfs(fd,&buf,sizeof(buf),0);
 #endif
-#if defined(LINUX) || defined(NEXT)
+#if defined(LINUX) || defined(NEXT) || defined(__NetBSD__)
   err = fstatfs(fd,&buf);
 #endif
   /* in 32 bit land, the number of bytes can easily go over 2^32, so we'll look at kbytes here */