summaryrefslogtreecommitdiff
path: root/emulators/pcemu/patches/patch-ac
blob: e079b4f31feceb3ef769ec73eb24ecfbcf5cf600 (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
33
34
35
36
37
38
39
40
41
$NetBSD: patch-ac,v 1.4 2004/09/16 17:16:18 minskim Exp $

--- mfs.c.orig	1994-06-22 09:24:51.000000000 -0500
+++ mfs.c
@@ -319,17 +319,24 @@ TODO:
 #include <errno.h>
 #include <sys/param.h>
 #include <stdlib.h>
+#if !__STDC__
 #include <malloc.h>
+#endif
 
-#ifdef SOLARIS
+#if defined(SOLARIS) || (defined(__NetBSD__) && __NetBSD_Version__ >= 200040000)
 #include <fcntl.h>
 #include <sys/statvfs.h>
 #endif
 
 #if defined(SGI) || defined(RS6000)
-#include <sys/statfs.h>
+# include <sys/statfs.h>
 #else
-#include <sys/vfs.h>
+# include <sys/param.h>
+# if BSD >= 199103
+#  include <sys/mount.h>
+# else
+#  include <sys/vfs.h>
+# endif /* new BSD */
 #endif
 
 
@@ -768,7 +775,7 @@ get_unix_attr(int mode, int attr)
 int
 get_disk_space(char *cwd, int *free, int *total)
 {
-#ifdef SOLARIS
+#if defined(SOLARIS) || (defined(__NetBSD__) && __NetBSD_Version__ >= 200040000)
     struct statvfs fsbuf;
     if (statvfs(cwd, &fsbuf) >= 0)
 #else