summaryrefslogtreecommitdiff
path: root/net-analyzer/nagios-plugins-snmp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-01 21:06:00 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-01 21:06:00 +0000
commit129160ec854dca4c3fedb5bcfbcb56930371da0f (patch)
tree53bf797418ac5e9b99c41ca0382c87b82421e5de /net-analyzer/nagios-plugins-snmp
parent441d1370330332b7d78f238d2f5e13f7aed5e4e0 (diff)
gentoo new year resync : 01.01.2021
Diffstat (limited to 'net-analyzer/nagios-plugins-snmp')
-rw-r--r--net-analyzer/nagios-plugins-snmp/Manifest3
-rw-r--r--net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch83
-rw-r--r--net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild4
3 files changed, 88 insertions, 2 deletions
diff --git a/net-analyzer/nagios-plugins-snmp/Manifest b/net-analyzer/nagios-plugins-snmp/Manifest
index 9a9aa4f38183..bec87e1e6816 100644
--- a/net-analyzer/nagios-plugins-snmp/Manifest
+++ b/net-analyzer/nagios-plugins-snmp/Manifest
@@ -1,3 +1,4 @@
+AUX nagios-plugins-snmp-0.6.0-fno-common.patch 2557 BLAKE2B 66e77015b81449bfa13c422af4eb5e110fa7650b08f09877b23f96ffd8715655a9851786225e545cb2260f11e3b0338d1d799148e5bdaa1ce3157630005dae4a SHA512 7809f8fa2cbac92ed0bf34d2de954d91e2a21a3e54e3593fb2e9e4bce0f6fe86853a81c7cc403fffe3a890f403a13e86ad87c9f90845178e051a8911b4a1c1dc
DIST nagios-plugins-snmp-0.6.0.tgz 381664 BLAKE2B 1a6124b5aa194123b17a1ce98a4e023a8d71f70a6c5ae61b8b54b204050f7914f100e1e639630955e45905f86282cab6a7034e5927b3db5b609beb315a66c748 SHA512 42fe9e2a9a99876d81731d821b7d1e4700f8637c8a890980f5cb3de4a3985210d86d38fd7ebbd7d075ff616da518cc932f5eb999f47fc3833ed62c1f7d4f4529
-EBUILD nagios-plugins-snmp-0.6.0-r2.ebuild 864 BLAKE2B 65cf2b3b42dfb1e241071480e90207adbe4c57b6baeec997b853af93e1ce24a017dff5374f98b5f48396e623ff93ee81f4463109ca799b6f3deb39b423ab05a6 SHA512 f1f1a2eb8695d2dea00e6495fd3022fd4827533cb0958aaee49ffaf51325341ad7bf0deee6f27ae9a9c87ff545eaef73a9e17ab43a055271c45a4706b7ff49ea
+EBUILD nagios-plugins-snmp-0.6.0-r2.ebuild 913 BLAKE2B 4a8227c7770e50b27b86c796d838fd52a737c0367c8781ad4078f780a81f3307600de13e7ef15e2ba1be94033cde203916a5b944c162203508c3dfe663a5b257 SHA512 ad6be9c5ce70708b816e55b93cd5579145777722aea2d43b5b2564ce837b0944144a5e95fb967c3794aa970aaed4d6fec9b20d7ae6cc5be61fa310ad14260907
MISC metadata.xml 271 BLAKE2B 7231d9dcb020ef6bb73db6e7038abab171c5ac137e457e50bd730b126a20a8af0a21b1cb987b00b8965af807dde7b0431dfacb6066d15d08b5bfbfbaecf3e5a0 SHA512 f323a192c090757e24caa9352b8be964050a00a86d174507c858c2a3a61767c243dba99ac37571779128d73e9bf6817f056d6d590be2b2ec8a8e3f3a92a4f304
diff --git a/net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch b/net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch
new file mode 100644
index 000000000000..5fd2ff1c2351
--- /dev/null
+++ b/net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch
@@ -0,0 +1,83 @@
+--- a/src/nagios_common_snmp.c
++++ b/src/nagios_common_snmp.c
+@@ -1,5 +1,22 @@
+ #include "nagios_common_snmp.h"
+
++char plugin_name[30]; /* plugin name */
++char plugin_tmp_prefix[50];
++char output[MAX_OUTPUT];
++int output_overflow;
++char *p_output;
++char *o_host;
++int o_verb;
++char* error;
++int o_port,o_timeout;
++int o_help, o_verbose,o_version,o_v2c;
++int retries;
++int o_snmpver,snmp_bulk;
++char *o_community,*o_login,*o_passwd,*o_privpasswd;
++char *o_protocols[2],*o_authproto,*o_privproto;
++struct snmp_session session, *ss;
++
++
+ int init_plugins_gettext(){
+ if (setlocale( LC_ALL, "" )==NULL) return 1;
+ bindtextdomain( PACKAGE, LOCALEDIR );
+--- a/src/nagios_common_snmp.h
++++ b/src/nagios_common_snmp.h
+@@ -56,8 +56,8 @@ int init_plugins_gettext();
+ /*********************************** Utilities ****************************************/
+ /* cache utilities */
+
+-char plugin_name[30]; /* plugin name */
+-char plugin_tmp_prefix[50];
++extern char plugin_name[30]; /* plugin name */
++extern char plugin_tmp_prefix[50];
+
+ /* defined in configure script */
+ /*#define BASE_CACHE "/tmp/cache"*/
+@@ -71,12 +71,12 @@ int write_cache(snmp_table **descT,int num);
+
+ /* maximum caracters in ouput */
+ #define MAX_OUTPUT 500
+-char output[MAX_OUTPUT];
+-int output_overflow;
++extern char output[MAX_OUTPUT];
++extern int output_overflow;
+
+ /* maximum caracters for performance output label*/
+ #define MAX_LABEL_SIZE 50
+-char *p_output;
++extern char *p_output;
+
+ /* Put data in output */
+ void strcat_output(const char *string);
+@@ -143,18 +143,18 @@ int get_options (int narg, char* const valarg[],options_nagsnmp *liste, int n_li
+ #define TIMEOUT_DEFAULT 3
+
+ /* standard options */
+-char *o_host;
+-int o_verb;
+-char* error;
++extern char *o_host;
++extern int o_verb;
++extern char* error;
+ /* snmp options */
+-int o_port,o_timeout;
+-int o_help, o_verbose,o_version,o_v2c;
+-int retries;
+-int o_snmpver,snmp_bulk;
+-char *o_community,*o_login,*o_passwd,*o_privpasswd;
+-char *o_protocols[2],*o_authproto,*o_privproto;
++extern int o_port,o_timeout;
++extern int o_help, o_verbose,o_version,o_v2c;
++extern int retries;
++extern int o_snmpver,snmp_bulk;
++extern char *o_community,*o_login,*o_passwd,*o_privpasswd;
++extern char *o_protocols[2],*o_authproto,*o_privproto;
+ /* snmp sessions */
+-struct snmp_session session, *ss;
++extern struct snmp_session session, *ss;
+
+ /* Common options definition and check */
+ #define common_usage "[-v -V] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] [-t <timeout>]"
diff --git a/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild
index 6eb4daae21ea..005fd81aef64 100644
--- a/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild
+++ b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild
@@ -19,7 +19,9 @@ DEPEND="
net-analyzer/net-snmp"
RDEPEND="${DEPEND}"
-S="${WORKDIR}/nagios-plugins-snmp"
+S="${WORKDIR}"/nagios-plugins-snmp
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
src_prepare() {
default