blob: 811c045c19a390b0e36611d5a901324c49a1a4b8 (
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
42
43
44
45
|
$NetBSD: patch-ab,v 1.7 2009/08/28 20:46:19 hasso Exp $
--- source/blender/blenlib/intern/storage.c.orig 2009-05-25 19:46:22 +0300
+++ source/blender/blenlib/intern/storage.c 2009-08-28 21:32:31 +0300
@@ -47,7 +47,7 @@
#include <time.h>
#include <sys/stat.h>
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__)
#include <sys/statvfs.h> /* Other modern unix os's should probably use this also */
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
#include <sys/statfs.h>
@@ -88,10 +88,6 @@ struct statfs {
#include <pwd.h>
#endif
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
-#include <malloc.h>
-#endif
-
/* lib includes */
#include "MEM_guardedalloc.h"
@@ -179,7 +175,7 @@ double BLI_diskfree(char *dir)
return (double) (freec*bytesps*sectorspc);
#else
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__)
struct statvfs disk;
#else
struct statfs disk;
@@ -204,9 +200,9 @@ double BLI_diskfree(char *dir)
return -1;
#endif
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined(__DragonFly__) || defined (__NetBSD__)
if (statvfs(name, &disk)) return(-1);
-#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
+#elif !defined(__FreeBSD__) && !defined(linux) && !defined (__OpenBSD__) && !defined (__NetBSD__) && (defined(__sparc) || defined(__sparc__))
/* WARNING - This may not be supported by geeneric unix os's - Campbell */
if (statfs(name, &disk, sizeof(struct statfs), 0)) return(-1);
#endif
|