summaryrefslogtreecommitdiff
path: root/emulators/pcemu/patches/patch-ac
blob: 2127ce91e7b33e48ff3a8bdcbe2686dc8b9be4f7 (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.5 2005/09/06 08:10:58 abs 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__ >= 299000900)
 #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__ >= 299000900)
     struct statvfs fsbuf;
     if (statvfs(cwd, &fsbuf) >= 0)
 #else