summaryrefslogtreecommitdiff
path: root/parallel/mpi-ch/patches/patch-ca
blob: c8bed7bde395735d573cf926e6a26bd4ec7de158 (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
46
47
48
49
50
51
$NetBSD: patch-ca,v 1.3 2005/09/06 08:10:59 abs Exp $
--- romio/adio/common/ad_fstype.c.orig	2003-09-04 13:24:44.000000000 -0700
+++ romio/adio/common/ad_fstype.c	2004-10-15 09:54:55.000000000 -0700
@@ -11,7 +11,15 @@
  */
 
 #include "adio.h"
-#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY))
+#ifdef __NetBSD__
+#include <sys/param.h>
+#if __NetBSD_Version__ >= 299000900
+#define NETBSD_STATVFS
+#define f_basetype f_fstypename
+#endif
+#endif
+
+#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY) || defined(NETBSD_STATVFS))
 #include <sys/statvfs.h>
 #endif
 #ifdef LINUX
@@ -159,10 +167,10 @@
     char *dir;
     int err;
 #endif
-#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY))
+#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY) || defined(NETBSD_STATVFS)) 
     struct statvfs vfsbuf;
 #endif
-#if (defined(LINUX) || defined(FREEBSD) || defined(tflops))
+#if (defined(LINUX) || defined(FREEBSD) || defined(tflops)) && !defined(NETBSD_STATVFS)
     struct statfs fsbuf;
 #endif
 #ifdef PARAGON
@@ -174,7 +182,7 @@
 
     *error_code = MPI_SUCCESS;
 
-#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY))
+#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY) || defined(NETBSD_STATVFS))
     do {
 	err = statvfs(filename, &vfsbuf);
     } while (err && (errno == ESTALE));
@@ -226,7 +234,7 @@
 #endif
 	else *fstype = ADIO_UFS;
     }
-#elif (defined(FREEBSD) && defined(HAVE_MOUNT_NFS))
+#elif (defined(FREEBSD) && defined(HAVE_MOUNT_NFS)) && !defined(NETBSD_STATVFS)
     do {
 	err = statfs(filename, &fsbuf);
     } while (err && (errno == ESTALE));