From 30a23201b8958660c8f201a78a8e56f5282b4bec Mon Sep 17 00:00:00 2001 From: drochner Date: Thu, 24 Jun 2004 17:31:43 +0000 Subject: make this build on -current again (statfs->statvfs) --- parallel/mpi-ch/distinfo | 3 ++- parallel/mpi-ch/patches/patch-ca | 52 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 parallel/mpi-ch/patches/patch-ca diff --git a/parallel/mpi-ch/distinfo b/parallel/mpi-ch/distinfo index b526e3eab17..ad5ac0be944 100644 --- a/parallel/mpi-ch/distinfo +++ b/parallel/mpi-ch/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2003/12/03 21:06:17 jschauma Exp $ +$NetBSD: distinfo,v 1.7 2004/06/24 17:31:43 drochner Exp $ SHA1 (mpich-1.2.5.2.tar.gz) = a767e56bab24d08a13903493e627e987e1685f50 Size (mpich-1.2.5.2.tar.gz) = 12383519 bytes @@ -24,3 +24,4 @@ SHA1 (patch-bb) = 7f399ed3d4bbaf00b75ec3a5ce8f114e4c6bbd23 SHA1 (patch-bc) = e89bbf9e1ef9f2aaa6b8000d170c5a158408988d SHA1 (patch-bd) = 7c96f575263fbe9adc0514ed64452db04cc68212 SHA1 (patch-be) = d21a703dbe17a48fb940ce65fd232284a57ff3cf +SHA1 (patch-ca) = 0fdb9a96df57bb8268d6d4e62e06794248cdbcf1 diff --git a/parallel/mpi-ch/patches/patch-ca b/parallel/mpi-ch/patches/patch-ca new file mode 100644 index 00000000000..f7a1e89dd2c --- /dev/null +++ b/parallel/mpi-ch/patches/patch-ca @@ -0,0 +1,52 @@ +$NetBSD: patch-ca,v 1.1 2004/06/24 17:32:14 drochner Exp $ + +--- romio/adio/common/ad_fstype.c.orig 2002-12-04 00:38:23.000000000 +0100 ++++ romio/adio/common/ad_fstype.c +@@ -12,7 +12,15 @@ + + #include "adio.h" + +-#if (defined(HPUX) || defined(SPPUX) || defined(IRIX) || defined(SOLARIS) || defined(AIX) || defined(DEC) || defined(CRAY)) ++#ifdef __NetBSD__ ++#include ++#if __NetBSD_Version__ >= 200040000 ++#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 + #endif + #ifdef LINUX +@@ -143,10 +151,10 @@ static void ADIO_FileSysType_fncall(char + 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 +@@ -158,7 +166,7 @@ static void ADIO_FileSysType_fncall(char + + *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)); +@@ -207,7 +215,7 @@ static void ADIO_FileSysType_fncall(char + # 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)); -- cgit v1.2.3