diff options
author | bouyer <bouyer@pkgsrc.org> | 2006-02-18 17:19:20 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2006-02-18 17:19:20 +0000 |
commit | 16aae89f33a3687ba810ce3a79c1e0459cc1ba2a (patch) | |
tree | c4524ae603947722426e19b8849dc2b5a79422b2 /net/nagios-plugins | |
parent | 274cd8c08ebd9e8e2892bac3f2200769df8e1818 (diff) | |
download | pkgsrc-16aae89f33a3687ba810ce3a79c1e0459cc1ba2a.tar.gz |
Initial import of nagios-plugins 1.4.2, based on nagios-plugins from pkgsrc-wip.
This package contains the basic monitoring plugins for nagios. For
more information about nagios, see the 'nagios-base' package.
Diffstat (limited to 'net/nagios-plugins')
-rw-r--r-- | net/nagios-plugins/DESCR | 2 | ||||
-rw-r--r-- | net/nagios-plugins/Makefile | 27 | ||||
-rw-r--r-- | net/nagios-plugins/Makefile.common | 10 | ||||
-rw-r--r-- | net/nagios-plugins/Makefile.plugin | 28 | ||||
-rw-r--r-- | net/nagios-plugins/PLIST | 53 | ||||
-rw-r--r-- | net/nagios-plugins/distinfo | 14 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ab | 121 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ad | 25 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ae | 13 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-af | 22 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ag | 17 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ah | 12 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ai | 21 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-aj | 13 | ||||
-rw-r--r-- | net/nagios-plugins/patches/patch-ak | 105 |
15 files changed, 483 insertions, 0 deletions
diff --git a/net/nagios-plugins/DESCR b/net/nagios-plugins/DESCR new file mode 100644 index 00000000000..0781daa6cfa --- /dev/null +++ b/net/nagios-plugins/DESCR @@ -0,0 +1,2 @@ +This package contains the basic monitoring plugins for nagios. For +more information about nagios, see the 'nagios-base' package. diff --git a/net/nagios-plugins/Makefile b/net/nagios-plugins/Makefile new file mode 100644 index 00000000000..e4217516237 --- /dev/null +++ b/net/nagios-plugins/Makefile @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ +# + +CATEGORIES= net sysutils +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagiosplug/} + +MAINTAINER= tech-pkg@NetBSD.org +HOMEPAGE= http://sourceforge.net/projects/nagiosplug/ +COMMENT= Nagios plugins + +.include "../../net/nagios-plugins/Makefile.common" + +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "NetBSD" +CONFIGURE_ARGS+= --with-df-command="/bin/df -Pklt nokernfs,procfs,fdesc" +.endif + +DEPENDS+= nagios-base>=2.0:../../net/nagios-base + +.if !exists(/usr/bin/ssh) +DEPENDS+= {ssh{,6}-[0-9]*,openssh-[0-9]*}:../../security/openssh +.endif + +.include "../../security/openssl/buildlink3.mk" +.include "../../devel/gettext-lib/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/net/nagios-plugins/Makefile.common b/net/nagios-plugins/Makefile.common new file mode 100644 index 00000000000..37269f9cb7b --- /dev/null +++ b/net/nagios-plugins/Makefile.common @@ -0,0 +1,10 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ +# + +PLUGINSVERSION= 1.4.2 +DISTNAME= nagios-plugins-${PLUGINSVERSION} + +.include "../../net/nagios-base/Makefile.common" + +CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER:Q} +CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q} diff --git a/net/nagios-plugins/Makefile.plugin b/net/nagios-plugins/Makefile.plugin new file mode 100644 index 00000000000..61b79d64f83 --- /dev/null +++ b/net/nagios-plugins/Makefile.plugin @@ -0,0 +1,28 @@ +# $NetBSD: Makefile.plugin,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ +# + +do-build: + cd ${WRKSRC}/lib && ${SETENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} +.if ${BINARY_TARGET:D1} + cd ${WRKSRC}/plugins && ${SETENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${BINARY_TARGET} +.endif +.if ${SCRIPT_TARGET:D1} + cd ${WRKSRC}/plugins-scripts && ${SETENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${SCRIPT_TARGET} +.endif + +do-install: +.if ${BINARY_TARGET:D1} + for PROG in ${BINARY_TARGET}; do \ + ${INSTALL_PROGRAM} ${WRKSRC}/plugins/$${PROG} \ + ${PREFIX}/libexec/nagios; \ + done +.endif +.if ${SCRIPT_TARGET:D1} + for PROG in ${SCRIPT_TARGET}; do \ + ${INSTALL_SCRIPT} ${WRKSRC}/plugins-scripts/$${PROG} \ + ${PREFIX}/libexec/nagios; \ + done +.endif diff --git a/net/nagios-plugins/PLIST b/net/nagios-plugins/PLIST new file mode 100644 index 00000000000..c1fa94b862e --- /dev/null +++ b/net/nagios-plugins/PLIST @@ -0,0 +1,53 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ +libexec/nagios/check_by_ssh +libexec/nagios/check_dhcp +libexec/nagios/check_dig +libexec/nagios/check_disk +libexec/nagios/check_dns +libexec/nagios/check_dummy +libexec/nagios/check_file_age +libexec/nagios/check_ftp +libexec/nagios/check_http +libexec/nagios/check_icmp +libexec/nagios/check_imap +libexec/nagios/check_ircd +libexec/nagios/check_jabber +libexec/nagios/check_load +libexec/nagios/check_log +libexec/nagios/check_mailq +libexec/nagios/check_mrtg +libexec/nagios/check_mrtgtraf +libexec/nagios/check_nagios +libexec/nagios/check_nntp +libexec/nagios/check_nntps +libexec/nagios/check_ntp +libexec/nagios/check_nwstat +libexec/nagios/check_overcr +libexec/nagios/check_ping +libexec/nagios/check_pop +libexec/nagios/check_procs +libexec/nagios/check_real +libexec/nagios/check_rpc +libexec/nagios/check_simap +libexec/nagios/check_smtp +libexec/nagios/check_spop +libexec/nagios/check_ssh +libexec/nagios/check_ssmtp +libexec/nagios/check_swap +libexec/nagios/check_tcp +libexec/nagios/check_time +libexec/nagios/check_udp +libexec/nagios/check_udp2 +libexec/nagios/check_ups +libexec/nagios/check_users +libexec/nagios/negate +libexec/nagios/urlize +libexec/nagios/utils.pm +libexec/nagios/utils.sh +share/nagios/locale/de/LC_MESSAGES/nagios-plugins.mo +share/nagios/locale/fr/LC_MESSAGES/nagios-plugins.mo +@dirrm share/nagios/locale/fr/LC_MESSAGES +@dirrm share/nagios/locale/fr +@dirrm share/nagios/locale/de/LC_MESSAGES +@dirrm share/nagios/locale/de +@dirrm share/nagios/locale diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo new file mode 100644 index 00000000000..f5b6321d27e --- /dev/null +++ b/net/nagios-plugins/distinfo @@ -0,0 +1,14 @@ +$NetBSD: distinfo,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +SHA1 (nagios-plugins-1.4.2.tar.gz) = d12238c75c0bbb0c7cb8e81585effe5375b9ced4 +RMD160 (nagios-plugins-1.4.2.tar.gz) = 93d747bb445e4e59cdb72ef210feb052b7855cac +Size (nagios-plugins-1.4.2.tar.gz) = 971447 bytes +SHA1 (patch-ab) = 040ec551e93d13a5da7cf5b6b09bd9afbef818b1 +SHA1 (patch-ad) = 2b88b23b790b454cb1f5e2dc1b6735a43534834c +SHA1 (patch-ae) = df35396bb9fa1e61faf3c0067bb0b82ba6d0847d +SHA1 (patch-af) = 95ba4451458fe50abb6f60109b67d30900661696 +SHA1 (patch-ag) = 30381eb5be9fc17c51095d859d58f8d81c09a44e +SHA1 (patch-ah) = b9f9f36d2c77ac08213dfea4df443872230f8099 +SHA1 (patch-ai) = 383f5b19466c82454e198e1b9cdbec2dcfd04047 +SHA1 (patch-aj) = 2e65a5b3bf9b666276867702a787f00da17ff29a +SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82 diff --git a/net/nagios-plugins/patches/patch-ab b/net/nagios-plugins/patches/patch-ab new file mode 100644 index 00000000000..e45d20bd03b --- /dev/null +++ b/net/nagios-plugins/patches/patch-ab @@ -0,0 +1,121 @@ +$NetBSD: patch-ab,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- configure.orig 2005-08-01 14:34:46.000000000 -0700 ++++ configure 2005-08-03 17:03:52.000000000 -0700 +@@ -8406,7 +8406,7 @@ + + fi + +-if test "$ac_cv_lib_crypt_main" = "yes"; then ++if false; then + if test -n "$PGSQL"; then + LDFLAGS="$LDFLAGS -L$PGSQL/lib" + CPPFLAGS="$CPPFLAGS -I$PGSQL/include" +@@ -9051,7 +9051,7 @@ + + fi + +-if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then ++if false; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient" + +@@ -9132,7 +9132,7 @@ + + fi + +-if test "$ac_cv_lib_ldap_main" = "yes"; then ++if false; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" + +@@ -9362,7 +9362,7 @@ + withval="$with_mysql" + MYSQL=$withval + fi; +-if test -n "$MYSQL"; then ++if false; then + MYSQLLIBDIR=$MYSQL/lib/mysql + CPPFLAGS="-I$MYSQL/include" + echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5 +@@ -10050,7 +10050,7 @@ + fi + + fi +-if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then ++if false; then + + + for ac_header in mysql/mysql.h mysql/errmsg.h +@@ -14789,7 +14789,7 @@ + echo $ECHO_N "checking for nslookup syntax... $ECHO_C" >&6 + if test -n "$PATH_TO_NSLOOKUP" + then +- if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep "Invalid option: sil" >/dev/null ++ if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | fgrep "Invalid option: sil" >/dev/null + then + ac_cv_nslookup_command="$PATH_TO_NSLOOKUP" + echo "$as_me:$LINENO: result: $ac_cv_nslookup_command" >&5 +@@ -15131,7 +15131,7 @@ + echo "${ECHO_T}no" >&6 + fi + +-if test -x "$PATH_TO_LMSTAT" ++if false + then + + cat >>confdefs.h <<_ACEOF +@@ -15182,7 +15182,7 @@ + echo "${ECHO_T}no" >&6 + fi + +-if test -x "$PATH_TO_SMBCLIENT" ++if false + then + + cat >>confdefs.h <<_ACEOF +@@ -15287,7 +15287,7 @@ + echo "${ECHO_T}no" >&6 + fi + +-if test -x "$PATH_TO_SNMPGET" ++if false + then + + cat >>confdefs.h <<_ACEOF +@@ -15339,7 +15339,7 @@ + echo "${ECHO_T}no" >&6 + fi + +-if test -x "$PATH_TO_SNMPGETNEXT" ++if false + then + + cat >>confdefs.h <<_ACEOF +@@ -15348,7 +15348,7 @@ + + fi + +-if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) ++if false + then + echo "$as_me:$LINENO: checking for Net::SNMP perl module" >&5 + echo $ECHO_N "checking for Net::SNMP perl module... $ECHO_C" >&6 +@@ -15500,7 +15500,7 @@ + echo "${ECHO_T}no" >&6 + fi + +-if test -x "$PATH_TO_FPING" ++if false + then + + cat >>confdefs.h <<_ACEOF +@@ -16657,7 +16657,7 @@ + EXTRAS="$EXTRAS check_dig" + fi + +-if test -f plugins/check_nt.c ; then ++if false ; then + EXTRAS="$EXTRAS check_nt" + elif test -f ../plugins/check_nt.c ; then + EXTRAS="$EXTRAS check_nt" diff --git a/net/nagios-plugins/patches/patch-ad b/net/nagios-plugins/patches/patch-ad new file mode 100644 index 00000000000..15126b27380 --- /dev/null +++ b/net/nagios-plugins/patches/patch-ad @@ -0,0 +1,25 @@ +$NetBSD: patch-ad,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins-scripts/Makefile.in.orig 2005-08-01 14:34:40.000000000 -0700 ++++ plugins-scripts/Makefile.in 2005-08-04 11:02:01.000000000 -0700 +@@ -238,14 +238,14 @@ + with_nagios_user = @with_nagios_user@ + with_trusted_path = @with_trusted_path@ + SUFFIXES = .pl .sh +-libexec_SCRIPTS = check_breeze check_disk_smb check_flexlm check_ircd \ +- check_log check_ntp check_oracle check_rpc check_sensors check_wave \ +- check_ifstatus check_ifoperstatus check_mailq check_file_age \ ++libexec_SCRIPTS = check_ircd \ ++ check_log check_ntp check_rpc \ ++ check_mailq check_file_age \ + utils.sh utils.pm + +-EXTRA_DIST = check_breeze.pl check_disk_smb.pl check_flexlm.pl check_ircd.pl \ +- check_log.sh check_ntp.pl check_oracle.sh check_rpc.pl check_sensors.sh \ +- check_ifstatus.pl check_ifoperstatus.pl check_wave.pl check_mailq.pl check_file_age.pl \ ++EXTRA_DIST = check_ircd.pl \ ++ check_log.sh check_ntp.pl check_rpc.pl \ ++ check_mailq.pl check_file_age.pl \ + utils.sh.in utils.pm.in t + + TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) diff --git a/net/nagios-plugins/patches/patch-ae b/net/nagios-plugins/patches/patch-ae new file mode 100644 index 00000000000..2ae1ccd6eed --- /dev/null +++ b/net/nagios-plugins/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins/Makefile.am.orig Fri Jul 11 08:11:06 2003 ++++ plugins/Makefile.am +@@ -33,7 +33,7 @@ TESTS = @PLUGIN_TEST@ + test: + perl -I $(top_builddir) -I $(top_srcdir) ../test.pl + +-AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ ++#AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ + + ############################################################################## + # the actual targets diff --git a/net/nagios-plugins/patches/patch-af b/net/nagios-plugins/patches/patch-af new file mode 100644 index 00000000000..c859f50fd96 --- /dev/null +++ b/net/nagios-plugins/patches/patch-af @@ -0,0 +1,22 @@ +$NetBSD: patch-af,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins/Makefile.in.orig 2005-09-19 15:58:12.000000000 +0200 ++++ plugins/Makefile.in 2005-10-14 21:57:33.000000000 +0200 +@@ -402,7 +402,7 @@ + NETLIBS = $(NETOBJS) $(SOCKETLIBS) + TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) + TESTS = @PLUGIN_TEST@ +-AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ ++#AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ + + ############################################################################## + # the actual targets +@@ -977,7 +977,7 @@ + install-exec-hook: + cd $(DESTDIR)$(libexecdir) && \ + for i in $(check_tcp_programs) ; do rm -f $$i; ln -s check_tcp $$i ; done ;\ +- if [ -x check_ldaps ] ; then rm -f check_ldaps ; ln -s check_ldap check_ldaps ; fi ++ #if [ -x check_ldaps ] ; then rm -f check_ldaps ; ln -s check_ldap check_ldaps ; fi + + clean-local: + rm -f $(check_tcp_programs) diff --git a/net/nagios-plugins/patches/patch-ag b/net/nagios-plugins/patches/patch-ag new file mode 100644 index 00000000000..3377f2ec404 --- /dev/null +++ b/net/nagios-plugins/patches/patch-ag @@ -0,0 +1,17 @@ +$NetBSD: patch-ag,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins-scripts/utils.sh.in.orig 2002-06-05 21:16:56.000000000 -0700 ++++ plugins-scripts/utils.sh.in 2005-08-04 10:58:12.000000000 -0700 +@@ -14,10 +14,10 @@ + + print_revision() { + echo "$1 (@PACKAGE@ @VERSION@) $2" +- $ECHO "@WARRANTY@" | /bin/sed -e 's/\n/ /g' ++ $ECHO "@WARRANTY@" | /usr/bin/sed -e 's/\n/ /g' + } + + support() { +- $ECHO "@SUPPORT@" | /bin/sed -e 's/\n/ /g' ++ $ECHO "@SUPPORT@" | /usr/bin/sed -e 's/\n/ /g' + } + diff --git a/net/nagios-plugins/patches/patch-ah b/net/nagios-plugins/patches/patch-ah new file mode 100644 index 00000000000..e5e0d4ce770 --- /dev/null +++ b/net/nagios-plugins/patches/patch-ah @@ -0,0 +1,12 @@ +$NetBSD: patch-ah,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins-scripts/check_ntp.pl.orig 2005-08-04 08:07:01.000000000 -0700 ++++ plugins-scripts/check_ntp.pl 2005-08-04 08:08:39.000000000 -0700 +@@ -307,6 +307,7 @@ + } else { + $jitter_error = $ERRORS{'OK'}; + } ++ last; + } else { + print "No match!\n" if $verbose; + $jitter = '(not parsed)'; diff --git a/net/nagios-plugins/patches/patch-ai b/net/nagios-plugins/patches/patch-ai new file mode 100644 index 00000000000..93e7860ec59 --- /dev/null +++ b/net/nagios-plugins/patches/patch-ai @@ -0,0 +1,21 @@ +$NetBSD: patch-ai,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins-scripts/subst.in.orig 2005-08-04 10:24:09.000000000 -0700 ++++ plugins-scripts/subst.in 2005-08-04 10:24:23.000000000 -0700 +@@ -9,13 +9,14 @@ + + sub(/\/.*\//,"",c); + for (dir in path) { ++ if (match(path[dir], /.tools/ ) != 0 ) { ++ continue; ++ } + cmd = "test -x " path[dir] "/" c; + if (system(cmd)==0) { + return path[dir] "/" c; + } + } +- +- + return c; + } + diff --git a/net/nagios-plugins/patches/patch-aj b/net/nagios-plugins/patches/patch-aj new file mode 100644 index 00000000000..a393513fc20 --- /dev/null +++ b/net/nagios-plugins/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- plugins-scripts/check_log.sh.orig 2005-08-04 10:29:25.000000000 -0700 ++++ plugins-scripts/check_log.sh 2005-08-04 10:29:54.000000000 -0700 +@@ -201,7 +201,7 @@ + count=`$GREP -c "$query" $tempdiff` + + # Get the last matching entry in the diff file +-lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1` ++lastentry=`$GREP "$query" $tempdiff | $TAIL -n 1` + + $RM -f $tempdiff + $CAT $logfile > $oldlog diff --git a/net/nagios-plugins/patches/patch-ak b/net/nagios-plugins/patches/patch-ak new file mode 100644 index 00000000000..e3e76bc81d9 --- /dev/null +++ b/net/nagios-plugins/patches/patch-ak @@ -0,0 +1,105 @@ +$NetBSD: patch-ak,v 1.1.1.1 2006/02/18 17:19:20 bouyer Exp $ + +--- lib/mountlist.c.orig 2005-10-14 22:09:29.000000000 +0200 ++++ lib/mountlist.c 2005-10-14 22:23:14.000000000 +0200 +@@ -66,7 +66,11 @@ + # if HAVE_STRUCT_FSSTAT_F_FSTYPENAME + # define FS_TYPE(Ent) ((Ent).f_fstypename) + # else +-# define FS_TYPE(Ent) mnt_names[(Ent).f_type] ++# ifdef STAT_STATVFS ++# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid] ++# else ++# define FS_TYPE(Ent) mnt_names[(Ent).f_type] ++# endif + # endif + #endif /* MOUNTED_GETFSSTAT */ + +@@ -109,6 +113,10 @@ + # include <sys/statfs.h> + #endif + ++#ifdef HAVE_SYS_STATVFS_H ++#include <sys/statvfs.h> ++#endif ++ + #ifdef MOUNTED_LISTMNTENT + # include <mntent.h> + #endif +@@ -173,7 +181,7 @@ + + #if MOUNTED_GETMNTINFO + +-# if ! HAVE_F_FSTYPENAME_IN_STATFS ++# if ! HAVE_F_FSTYPENAME_IN_STATFS && ! STAT_STATVFS + static char * + fstype_to_string (short t) + { +@@ -271,12 +279,16 @@ + + /* __NetBSD__ || BSD_NET2 || __OpenBSD__ */ + static char * ++#ifdef STAT_STATVFS ++fsp_to_string (const struct statvfs *fsp) ++#else + fsp_to_string (const struct statfs *fsp) ++#endif + { +-# if defined HAVE_F_FSTYPENAME_IN_STATFS ++# if defined HAVE_F_FSTYPENAME_IN_STATFS || defined STAT_STATVFS + return (char *) (fsp->f_fstypename); + # else +- return fstype_to_string (fsp->f_type); ++ return fstype_to_string (fsp->f_type); + # endif + } + +@@ -381,7 +393,11 @@ + + #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ + { ++#ifdef STAT_STATVFS ++ struct statvfs *fsp; ++#else + struct statfs *fsp; ++#endif + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); +@@ -543,9 +559,17 @@ + { + int numsys, counter; + size_t bufsize; ++#ifdef STAT_STATVFS ++ struct statvfs *stats; ++#else + struct statfs *stats; ++#endif + ++#ifdef STAT_STATVFS ++ numsys = getfsstat ((struct statvfs *)0, 0L, MNT_NOWAIT); ++#else + numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT); ++#endif + if (numsys < 0) + return (NULL); + if (SIZE_MAX / sizeof *stats <= numsys) +@@ -608,10 +632,18 @@ + # ifdef GETFSTYP /* SVR3. */ + if (need_fs_type) + { ++#ifdef STAT_STATVFS ++ struct statvfs fsd; ++#else + struct statfs fsd; ++#endif + char typebuf[FSTYPSZ]; + ++#ifdef STAT_STATVFS ++ if (statvfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 ++#else + if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 ++#endif + && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) + { + me->me_type = xstrdup (typebuf); |