summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-04-02 10:35:35 +0000
committernia <nia@pkgsrc.org>2022-04-02 10:35:35 +0000
commit7faec882e2b5d7b4919767366c6efc53fb8bda99 (patch)
tree829d8171769617474b37ea0845ad2d7c8733d16c /net
parent586ad6ea26d56792d4dba72cbcc241d75e30284c (diff)
downloadpkgsrc-7faec882e2b5d7b4919767366c6efc53fb8bda99.tar.gz
nagios-plugins: Fix building on NetBSD-current.
Diffstat (limited to 'net')
-rw-r--r--net/nagios-plugins/distinfo5
-rw-r--r--net/nagios-plugins/patches/patch-plugins_check__ide__smart.c22
-rw-r--r--net/nagios-plugins/patches/patch-plugins_check_nagios.c12
3 files changed, 29 insertions, 10 deletions
diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo
index e03187e111f..8b5706a595f 100644
--- a/net/nagios-plugins/distinfo
+++ b/net/nagios-plugins/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2021/10/26 11:06:04 nia Exp $
+$NetBSD: distinfo,v 1.27 2022/04/02 10:35:35 nia Exp $
BLAKE2s (nagios-plugins-2.2.1.tar.gz) = 976274874f96d7614ac6359b7feb9692874e947677d88a6d2daa6e569bb61ce5
SHA512 (nagios-plugins-2.2.1.tar.gz) = 6ffe313a56a305b382f62abc0f0958d7078f9050e1340f30721d6e6f71944b57b1650e90e6835c35dd7c9f3f4b4cee9f235b8382b0811db30b3729daaafc9bc3
@@ -13,5 +13,6 @@ SHA1 (patch-plugins-root_Makefile.in) = 46e8968df375ca35d453e36c277d4052f125897b
SHA1 (patch-plugins-scripts_check__breeze.pl) = 57ffda78989fd0d0c0fa26c74b7f53bd083dab4f
SHA1 (patch-plugins-scripts_check__wave.pl) = 535b008877cad780afa2ed3429ffb84e7da3ec28
SHA1 (patch-plugins__check_swap.c) = b822de3488ecace977a739ebcfc56229763cd945
+SHA1 (patch-plugins_check__ide__smart.c) = 34ea76bf79da83fa84b6f0ff7f425462d0aac69e
SHA1 (patch-plugins_check__radius.c) = 3f86bac4f7aa52931bad46d9ee4a421c2ee744f3
-SHA1 (patch-plugins_check_nagios.c) = a137ba674b2b61daa3af9a7be705d30af4a48aa8
+SHA1 (patch-plugins_check_nagios.c) = a58d12f461a4501a8066101e091307456faf32cf
diff --git a/net/nagios-plugins/patches/patch-plugins_check__ide__smart.c b/net/nagios-plugins/patches/patch-plugins_check__ide__smart.c
new file mode 100644
index 00000000000..bb00f1907f2
--- /dev/null
+++ b/net/nagios-plugins/patches/patch-plugins_check__ide__smart.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-plugins_check__ide__smart.c,v 1.1 2022/04/02 10:35:35 nia Exp $
+
+__u8 and __u16 are not defined in videoio.h in NetBSD 9.99.x.
+
+--- plugins/check_ide_smart.c.orig 2017-01-16 17:24:03.000000000 +0000
++++ plugins/check_ide_smart.c
+@@ -56,11 +56,14 @@ void print_usage (void);
+ #include <sys/device.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
+-#include <sys/videoio.h> /* for __u8 and friends */
+ #include <sys/scsiio.h>
+ #include <sys/ataio.h>
+ #include <dev/ata/atareg.h>
+ #include <dev/ic/wdcreg.h>
++#include <stdint.h>
++
++#define __u8 uint8_t
++#define __u16 uint16_t
+
+ #define SMART_ENABLE WDSM_ENABLE_OPS
+ #define SMART_DISABLE WDSM_DISABLE_OPS
diff --git a/net/nagios-plugins/patches/patch-plugins_check_nagios.c b/net/nagios-plugins/patches/patch-plugins_check_nagios.c
index eaf31310b27..1db787f73b8 100644
--- a/net/nagios-plugins/patches/patch-plugins_check_nagios.c
+++ b/net/nagios-plugins/patches/patch-plugins_check_nagios.c
@@ -1,11 +1,10 @@
-$NetBSD: patch-plugins_check_nagios.c,v 1.1 2018/08/03 14:03:09 manu Exp $
+$NetBSD: patch-plugins_check_nagios.c,v 1.2 2022/04/02 10:35:35 nia Exp $
Crash fix: initialize variable, check bounds on string copy.
---- plugins/check_nagios.c.orig
+--- plugins/check_nagios.c.orig 2017-01-19 16:01:31.000000000 +0000
+++ plugins/check_nagios.c
-@@ -71,9 +71,9 @@
- char procstat[8];
+@@ -72,7 +72,7 @@ main (int argc, char **argv)
#ifdef PS_USES_PROCETIME
char procetime[MAX_INPUT_BUFFER];
#endif /* PS_USES_PROCETIME */
@@ -14,9 +13,7 @@ Crash fix: initialize variable, check bounds on string copy.
char *procargs;
int pos, cols;
int expected_cols = PS_COLS - 1;
- const char *zombie = "Z";
-@@ -143,9 +143,10 @@
-
+@@ -144,7 +144,8 @@ main (int argc, char **argv)
/* Some ps return full pathname for command. This removes path */
temp_string = strtok ((char *)procprog, "/");
while (temp_string) {
@@ -26,4 +23,3 @@ Crash fix: initialize variable, check bounds on string copy.
temp_string = strtok (NULL, "/");
}
- /* May get empty procargs */