1 |
commit: 70fea962ceef821a065e9ad209ead1e493b22d29 |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Fri Jan 1 20:43:28 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 1 20:43:28 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70fea962 |
7 |
|
8 |
net-analyzer/nagios-plugins-snmp: Update fno-common.patch |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/18903 |
11 |
Closes: https://bugs.gentoo.org/762955 |
12 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
.../nagios-plugins-snmp-0.6.0-fno-common.patch | 155 +++++++++++---------- |
16 |
1 file changed, 79 insertions(+), 76 deletions(-) |
17 |
|
18 |
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 |
19 |
index 5fd2ff1c235..926a96d74d1 100644 |
20 |
--- a/net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch |
21 |
+++ b/net-analyzer/nagios-plugins-snmp/files/nagios-plugins-snmp-0.6.0-fno-common.patch |
22 |
@@ -1,83 +1,86 @@ |
23 |
+diff --git a/src/nagios_common_snmp.c b/src/nagios_common_snmp.c |
24 |
+index 5bdc571..73f96e8 100755 |
25 |
--- a/src/nagios_common_snmp.c |
26 |
+++ b/src/nagios_common_snmp.c |
27 |
-@@ -1,5 +1,22 @@ |
28 |
- #include "nagios_common_snmp.h" |
29 |
- |
30 |
-+char plugin_name[30]; /* plugin name */ |
31 |
-+char plugin_tmp_prefix[50]; |
32 |
-+char output[MAX_OUTPUT]; |
33 |
-+int output_overflow; |
34 |
-+char *p_output; |
35 |
-+char *o_host; |
36 |
-+int o_verb; |
37 |
-+char* error; |
38 |
-+int o_port,o_timeout; |
39 |
-+int o_help, o_verbose,o_version,o_v2c; |
40 |
-+int retries; |
41 |
-+int o_snmpver,snmp_bulk; |
42 |
-+char *o_community,*o_login,*o_passwd,*o_privpasswd; |
43 |
-+char *o_protocols[2],*o_authproto,*o_privproto; |
44 |
-+struct snmp_session session, *ss; |
45 |
-+ |
46 |
-+ |
47 |
- int init_plugins_gettext(){ |
48 |
- if (setlocale( LC_ALL, "" )==NULL) return 1; |
49 |
- bindtextdomain( PACKAGE, LOCALEDIR ); |
50 |
+@@ -1,5 +1,21 @@ |
51 |
+ #include "nagios_common_snmp.h" |
52 |
+ |
53 |
++char plugin_name[30]; /* plugin name */ |
54 |
++char plugin_tmp_prefix[50]; |
55 |
++char output[MAX_OUTPUT]; |
56 |
++int output_overflow; |
57 |
++char *p_output; |
58 |
++char *o_host; |
59 |
++int o_verb; |
60 |
++char* error; |
61 |
++int o_port,o_timeout; |
62 |
++int o_help, o_verbose,o_version,o_v2c; |
63 |
++int retries; |
64 |
++int o_snmpver,snmp_bulk; |
65 |
++char *o_community,*o_login,*o_passwd,*o_privpasswd; |
66 |
++char *o_protocols[2],*o_authproto,*o_privproto; |
67 |
++struct snmp_session session, *ss; |
68 |
++ |
69 |
+ int init_plugins_gettext(){ |
70 |
+ if (setlocale( LC_ALL, "" )==NULL) return 1; |
71 |
+ bindtextdomain( PACKAGE, LOCALEDIR ); |
72 |
+diff --git a/src/nagios_common_snmp.h b/src/nagios_common_snmp.h |
73 |
+index 8903fd0..1b3fa3a 100755 |
74 |
--- a/src/nagios_common_snmp.h |
75 |
+++ b/src/nagios_common_snmp.h |
76 |
@@ -56,8 +56,8 @@ int init_plugins_gettext(); |
77 |
- /*********************************** Utilities ****************************************/ |
78 |
- /* cache utilities */ |
79 |
- |
80 |
--char plugin_name[30]; /* plugin name */ |
81 |
--char plugin_tmp_prefix[50]; |
82 |
-+extern char plugin_name[30]; /* plugin name */ |
83 |
-+extern char plugin_tmp_prefix[50]; |
84 |
- |
85 |
- /* defined in configure script */ |
86 |
- /*#define BASE_CACHE "/tmp/cache"*/ |
87 |
+ /*********************************** Utilities ****************************************/ |
88 |
+ /* cache utilities */ |
89 |
+ |
90 |
+-char plugin_name[30]; /* plugin name */ |
91 |
+-char plugin_tmp_prefix[50]; |
92 |
++extern char plugin_name[30]; /* plugin name */ |
93 |
++extern char plugin_tmp_prefix[50]; |
94 |
+ |
95 |
+ /* defined in configure script */ |
96 |
+ /*#define BASE_CACHE "/tmp/cache"*/ |
97 |
@@ -71,12 +71,12 @@ int write_cache(snmp_table **descT,int num); |
98 |
- |
99 |
- /* maximum caracters in ouput */ |
100 |
- #define MAX_OUTPUT 500 |
101 |
--char output[MAX_OUTPUT]; |
102 |
--int output_overflow; |
103 |
-+extern char output[MAX_OUTPUT]; |
104 |
-+extern int output_overflow; |
105 |
- |
106 |
- /* maximum caracters for performance output label*/ |
107 |
- #define MAX_LABEL_SIZE 50 |
108 |
--char *p_output; |
109 |
-+extern char *p_output; |
110 |
- |
111 |
- /* Put data in output */ |
112 |
- void strcat_output(const char *string); |
113 |
+ |
114 |
+ /* maximum caracters in ouput */ |
115 |
+ #define MAX_OUTPUT 500 |
116 |
+-char output[MAX_OUTPUT]; |
117 |
+-int output_overflow; |
118 |
++extern char output[MAX_OUTPUT]; |
119 |
++extern int output_overflow; |
120 |
+ |
121 |
+ /* maximum caracters for performance output label*/ |
122 |
+ #define MAX_LABEL_SIZE 50 |
123 |
+-char *p_output; |
124 |
++extern char *p_output; |
125 |
+ |
126 |
+ /* Put data in output */ |
127 |
+ void strcat_output(const char *string); |
128 |
@@ -143,18 +143,18 @@ int get_options (int narg, char* const valarg[],options_nagsnmp *liste, int n_li |
129 |
- #define TIMEOUT_DEFAULT 3 |
130 |
- |
131 |
- /* standard options */ |
132 |
--char *o_host; |
133 |
--int o_verb; |
134 |
--char* error; |
135 |
-+extern char *o_host; |
136 |
-+extern int o_verb; |
137 |
-+extern char* error; |
138 |
- /* snmp options */ |
139 |
--int o_port,o_timeout; |
140 |
--int o_help, o_verbose,o_version,o_v2c; |
141 |
--int retries; |
142 |
--int o_snmpver,snmp_bulk; |
143 |
--char *o_community,*o_login,*o_passwd,*o_privpasswd; |
144 |
--char *o_protocols[2],*o_authproto,*o_privproto; |
145 |
-+extern int o_port,o_timeout; |
146 |
-+extern int o_help, o_verbose,o_version,o_v2c; |
147 |
-+extern int retries; |
148 |
-+extern int o_snmpver,snmp_bulk; |
149 |
-+extern char *o_community,*o_login,*o_passwd,*o_privpasswd; |
150 |
-+extern char *o_protocols[2],*o_authproto,*o_privproto; |
151 |
- /* snmp sessions */ |
152 |
--struct snmp_session session, *ss; |
153 |
-+extern struct snmp_session session, *ss; |
154 |
- |
155 |
- /* Common options definition and check */ |
156 |
- #define common_usage "[-v -V] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] [-t <timeout>]" |
157 |
+ #define TIMEOUT_DEFAULT 3 |
158 |
+ |
159 |
+ /* standard options */ |
160 |
+-char *o_host; |
161 |
+-int o_verb; |
162 |
+-char* error; |
163 |
++extern char *o_host; |
164 |
++extern int o_verb; |
165 |
++extern char* error; |
166 |
+ /* snmp options */ |
167 |
+-int o_port,o_timeout; |
168 |
+-int o_help, o_verbose,o_version,o_v2c; |
169 |
+-int retries; |
170 |
+-int o_snmpver,snmp_bulk; |
171 |
+-char *o_community,*o_login,*o_passwd,*o_privpasswd; |
172 |
+-char *o_protocols[2],*o_authproto,*o_privproto; |
173 |
++extern int o_port,o_timeout; |
174 |
++extern int o_help, o_verbose,o_version,o_v2c; |
175 |
++extern int retries; |
176 |
++extern int o_snmpver,snmp_bulk; |
177 |
++extern char *o_community,*o_login,*o_passwd,*o_privpasswd; |
178 |
++extern char *o_protocols[2],*o_authproto,*o_privproto; |
179 |
+ /* snmp sessions */ |
180 |
+-struct snmp_session session, *ss; |
181 |
++extern struct snmp_session session, *ss; |
182 |
+ |
183 |
+ /* Common options definition and check */ |
184 |
+ #define common_usage "[-v -V] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] [-t <timeout>]" |