Unclobber my previous patch some revisions ago which fixed the build on

FreeBSD. Resolves PR #49703.
This commit is contained in:
rodent 2015-04-13 03:59:40 +00:00
parent 928769f1e0
commit 619e8a3ba5
2 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.16 2015/04/03 17:50:27 rodent Exp $
$NetBSD: distinfo,v 1.17 2015/04/13 03:59:40 rodent Exp $
SHA1 (nagios-plugins-2.0.3.tar.gz) = 29b6183ab9d796299dc17c395eef493415d1e9d6
RMD160 (nagios-plugins-2.0.3.tar.gz) = b682b126c78df51f64d9cb8599d2f9dfd411d5f4
@ -7,7 +7,7 @@ SHA1 (patch-ad) = 7dc748ce7815f3f90212815a9fe9a9a7db961617
SHA1 (patch-af) = 8fd2e50ca63f014f88195552884913c7383cb6a1
SHA1 (patch-ah) = f884e80c1e09fefd5e37f087d95d3b76b9d44ab6
SHA1 (patch-ai) = 645ebd4ac16a71bd5944fe3850c809cb45bf6a4c
SHA1 (patch-ak) = cd052cfbe669cd64038ae23c624761dd3a7da188
SHA1 (patch-ak) = 093638669dd5b524d8a9b31d452f1ba737e684b3
SHA1 (patch-an) = 6ba8dec0eb62cd0097809daf8075248afd448695
SHA1 (patch-configure) = 8a06bbd0fa0649625ffb1c8e2f4b667714a40fe4
SHA1 (patch-plugins__check_swap.c) = 4a32398b3e8e596b9f67b3ea95a3acce37287b0b

View file

@ -1,4 +1,4 @@
$NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
$NetBSD: patch-ak,v 1.7 2015/04/13 03:59:41 rodent Exp $
--- gl/mountlist.c.orig 2014-03-04 21:41:56.000000000 +0000
+++ gl/mountlist.c
@ -7,7 +7,7 @@ $NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
# define FS_TYPE(Ent) ((Ent).f_fstypename)
# else
-# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+# ifdef STAT_STATVFS
+# if defined(STAT_STATVFS)
+# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid]
+# else
+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
@ -19,7 +19,7 @@ $NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
# include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#if defined(HAVE_SYS_STATVFS_H)
+#include <sys/statvfs.h>
+#endif
+
@ -39,14 +39,14 @@ $NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
# endif
static char *
+#ifdef STAT_STATVFS
+#if defined(STAT_STATVFS) && !defined(__FreeBSD__)
+fsp_to_string (const struct statvfs *fsp)
+#else
fsp_to_string (const struct statfs *fsp)
+#endif
{
-# if HAVE_STRUCT_STATFS_F_FSTYPENAME
+# if defined HAVE_STRUCT_STATFS_F_FSTYPENAME || defined STAT_STATVFS
+# if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(STAT_STATVFS)
return (char *) (fsp->f_fstypename);
# else
return fstype_to_string (fsp->f_type);
@ -54,7 +54,7 @@ $NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
{
int numsys, counter;
size_t bufsize;
+#ifdef STAT_STATVFS
+#if defined(STAT_STATVFS) && !defined(__FreeBSD__)
+ struct statvfs *stats;
+#else
struct statfs *stats;
@ -66,7 +66,7 @@ $NetBSD: patch-ak,v 1.6 2015/04/03 17:50:27 rodent Exp $
bufsize = (1 + numsys) * sizeof *stats;
stats = xmalloc (bufsize);
+#ifdef STAT_STATVFS
+#if defined(STAT_STATVFS)
+ numsys = getfsstat ((struct statvfs *)stats, bufsize, MNT_NOWAIT);
+#else
numsys = getfsstat (stats, bufsize, MNT_NOWAIT);