e5f2537809
adding a check in configure as I'd like to because it does not have any AC_CHECK_FUNCS call that I could easily use to do this (the diff could be quite big).
28 lines
913 B
Text
28 lines
913 B
Text
$NetBSD: patch-ab,v 1.3 2004/06/10 22:04:13 jmmv Exp $
|
|
|
|
--- source/blender/blenlib/intern/storage.c.orig 2003-05-29 16:09:25.000000000 +0200
|
|
+++ source/blender/blenlib/intern/storage.c
|
|
@@ -182,7 +182,11 @@ double BLI_diskfree(char *dir)
|
|
|
|
return (double) (freec*bytesps*sectorspc);
|
|
#else
|
|
+#if defined (__NetBSD__) && __NetBSD_Version__ >= 200040000 /* 2.0D */
|
|
+ struct statvfs disk;
|
|
+#else
|
|
struct statfs disk;
|
|
+#endif
|
|
char name[100],*slash;
|
|
|
|
|
|
@@ -193,7 +197,10 @@ double BLI_diskfree(char *dir)
|
|
if (slash) slash[1] = 0;
|
|
} else strcpy(name,"/");
|
|
|
|
-#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__)
|
|
+#if defined (__NetBSD__) && __NetBSD_Version__ >= 200040000 /* 2.0D */
|
|
+ if (statvfs(name, &disk)) return(-1);
|
|
+#elif defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || \
|
|
+ defined (__NetBSD__)
|
|
if (statfs(name, &disk)) return(-1);
|
|
#endif
|
|
#ifdef __BeOS
|