From fe7ba66f1c2c0890637faec574bf99d4cbb24150 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 4 May 2004 08:23:38 +0000 Subject: apply the patches from PR#25405: use statvfs if we find . now this builds with -current. --- sysutils/fam/distinfo | 4 ++-- sysutils/fam/patches/patch-ap | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'sysutils/fam') diff --git a/sysutils/fam/distinfo b/sysutils/fam/distinfo index ad76d55c57f..ed32da67d71 100644 --- a/sysutils/fam/distinfo +++ b/sysutils/fam/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.12 2004/04/18 17:11:08 jmmv Exp $ +$NetBSD: distinfo,v 1.13 2004/05/04 08:23:38 mrg Exp $ SHA1 (fam-2.7.0.tar.gz) = 6c2316f02acf89a41c42ffc3d7fd9cf5eada83a8 Size (fam-2.7.0.tar.gz) = 301974 bytes @@ -14,6 +14,6 @@ SHA1 (patch-ai) = b80aafbb3849fc8c828b6829d8975b910e4d0fd5 SHA1 (patch-aj) = 39391961fd7929d6a5fb49ecb492585cb821afaa SHA1 (patch-ak) = 48ddfcf9b7562832402a464437ca485249d371a1 SHA1 (patch-ao) = 64827309bf91a2018629e28fef20109dde3fbf01 -SHA1 (patch-ap) = 256910675fad9922c0bca47c5b080eb96b51fe1d +SHA1 (patch-ap) = aab5c139a5941fab9c570db70c0d170a678872d2 SHA1 (patch-au) = 6bd507eb448b3fd126042759a3b6f70335401c5b SHA1 (patch-ax) = 950e9fd9de885f653f96aebaafc2269f489e2fad diff --git a/sysutils/fam/patches/patch-ap b/sysutils/fam/patches/patch-ap index ad67ae1fa2b..9ca4dfc894e 100644 --- a/sysutils/fam/patches/patch-ap +++ b/sysutils/fam/patches/patch-ap @@ -1,8 +1,6 @@ -$NetBSD: patch-ap,v 1.4 2004/04/14 20:53:08 adam Exp $ - ---- src/mntent_compat.c++.orig Wed Apr 14 22:41:20 2004 -+++ src/mntent_compat.c++ -@@ -0,0 +1,176 @@ +--- src/mntent_compat.c++.orig 2004-04-30 14:24:58.000000000 +0200 ++++ src/mntent_compat.c++ 2004-04-30 14:28:45.000000000 +0200 +@@ -0,0 +1,191 @@ +/* + * Copyright (c) 1980, 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. @@ -48,6 +46,9 @@ $NetBSD: patch-ap,v 1.4 2004/04/14 20:53:08 adam Exp $ +#include +#include +#include ++#ifdef HAVE_SYS_STATVFS_H ++# include ++#endif + +static int pos = -1; +static int mntsize = -1; @@ -141,14 +142,22 @@ $NetBSD: patch-ap,v 1.4 2004/04/14 20:53:08 adam Exp $ +} + +static struct mntent * ++#ifdef HAVE_SYS_STATVFS_H ++statfs_to_mntent (struct statvfs *mntbuf) ++#else +statfs_to_mntent (struct statfs *mntbuf) ++#endif +{ + static char opts_buf[40], *tmp; + + _mntent.mnt_fsname = mntbuf->f_mntfromname; + _mntent.mnt_dir = mntbuf->f_mntonname; + _mntent.mnt_type = mntbuf->f_fstypename; ++#ifdef HAVE_SYS_STATVFS_H ++ tmp = flags2opts (mntbuf->f_flag); ++#else + tmp = flags2opts (mntbuf->f_flags); ++#endif + if (tmp) { + opts_buf[sizeof(opts_buf)-1] = '\0'; + strncpy (opts_buf, tmp, sizeof(opts_buf)-1); @@ -164,7 +173,11 @@ $NetBSD: patch-ap,v 1.4 2004/04/14 20:53:08 adam Exp $ +struct mntent * +getmntent (FILE *fp) +{ ++#ifdef HAVE_SYS_STATVFS_H ++ struct statvfs *mntbuf; ++#else + struct statfs *mntbuf; ++#endif + + if (pos == -1 || mntsize == -1) + mntsize = getmntinfo (&mntbuf, MNT_NOWAIT); -- cgit v1.2.3