1 Index: Makefile.in |
1 Index: Makefile.in |
2 --- Makefile.in.orig 2010-09-10 06:23:07.000000000 +0200 |
2 diff -Nau Makefile.in.orig Makefile.in |
3 +++ Makefile.in 2010-10-09 09:56:09.000000000 +0200 |
3 --- Makefile.in.orig 2011-07-02 00:35:46.000000000 +0200 |
4 @@ -18,7 +18,7 @@ |
4 +++ Makefile.in 2011-09-15 09:22:50.255341188 +0200 |
|
5 @@ -19,7 +19,7 @@ |
5 INCLUDESUBDIR=system |
6 INCLUDESUBDIR=system |
6 INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \ |
7 INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \ |
7 darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \ |
8 darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \ |
8 - freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd.h \ |
9 - freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd.h \ |
9 + freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h freebsd9.h freebsd.h \ |
10 + freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h freebsd9.h freebsd.h \ |
10 generic.h \ |
11 generic.h \ |
11 hpux.h irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \ |
12 hpux.h irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \ |
12 solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \ |
13 solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \ |
13 Index: agent/auto_nlist.c |
14 Index: agent/auto_nlist.c |
14 --- agent/auto_nlist.c.orig 2010-07-29 16:58:47.000000000 +0200 |
15 diff -Nau agent/auto_nlist.c.orig agent/auto_nlist.c |
15 +++ agent/auto_nlist.c 2010-10-09 09:08:23.000000000 +0200 |
16 --- agent/auto_nlist.c.orig 2011-07-02 00:35:46.000000000 +0200 |
|
17 +++ agent/auto_nlist.c 2011-09-15 09:22:50.256627584 +0200 |
16 @@ -53,6 +53,7 @@ |
18 @@ -53,6 +53,7 @@ |
17 } |
19 } |
18 if (*ptr == 0) { |
20 if (*ptr == 0) { |
19 *ptr = (struct autonlist *) malloc(sizeof(struct autonlist)); |
21 *ptr = (struct autonlist *) malloc(sizeof(struct autonlist)); |
20 + memset(*ptr, 0, sizeof(struct autonlist)); |
22 + memset(*ptr, 0, sizeof(struct autonlist)); |
21 it = *ptr; |
23 it = *ptr; |
22 it->left = 0; |
24 it->left = 0; |
23 it->right = 0; |
25 it->right = 0; |
24 Index: agent/mibgroup/mibII/tcp.c |
26 Index: agent/mibgroup/mibII/tcp.c |
25 --- agent/mibgroup/mibII/tcp.c.orig 2010-08-13 17:04:33.000000000 +0200 |
27 diff -Nau agent/mibgroup/mibII/tcp.c.orig agent/mibgroup/mibII/tcp.c |
26 +++ agent/mibgroup/mibII/tcp.c 2010-10-09 09:08:23.000000000 +0200 |
28 --- agent/mibgroup/mibII/tcp.c.orig 2011-07-02 00:35:46.000000000 +0200 |
27 @@ -87,7 +87,7 @@ |
29 +++ agent/mibgroup/mibII/tcp.c 2011-09-15 09:22:50.258135285 +0200 |
|
30 @@ -88,7 +88,7 @@ |
28 * But only define it under FreeBSD, since it |
31 * But only define it under FreeBSD, since it |
29 * breaks other systems (notable AIX) |
32 * breaks other systems (notable AIX) |
30 */ |
33 */ |
31 -#ifdef freebsd4 |
34 -#ifdef freebsd4 |
32 +#if defined (freebsd4) || defined (__NetBSD__) |
35 +#if defined (freebsd4) || defined (__NetBSD__) |
33 int hz = 1000; |
36 int hz = 1000; |
34 #endif |
37 #endif |
35 |
38 |
36 Index: agent/mibgroup/mibII/tcpTable.c |
39 Index: agent/mibgroup/mibII/tcpTable.c |
37 --- agent/mibgroup/mibII/tcpTable.c.orig 2010-06-16 15:13:25.000000000 +0200 |
40 diff -Nau agent/mibgroup/mibII/tcpTable.c.orig agent/mibgroup/mibII/tcpTable.c |
38 +++ agent/mibgroup/mibII/tcpTable.c 2010-10-09 09:08:23.000000000 +0200 |
41 --- agent/mibgroup/mibII/tcpTable.c.orig 2011-07-02 00:35:46.000000000 +0200 |
39 @@ -104,6 +104,11 @@ |
42 +++ agent/mibgroup/mibII/tcpTable.c 2011-09-15 09:22:50.260414149 +0200 |
|
43 @@ -110,6 +110,11 @@ |
40 #define TCPTABLE_REMOTEPORT pcb.inp_fport |
44 #define TCPTABLE_REMOTEPORT pcb.inp_fport |
41 #define TCPTABLE_IS_LINKED_LIST |
45 #define TCPTABLE_IS_LINKED_LIST |
42 |
46 |
43 +#if defined(__FreeBSD__) |
47 +#if defined(__FreeBSD__) |
44 +#undef INP_NEXT_SYMBOL |
48 +#undef INP_NEXT_SYMBOL |
88 + return (u_char *) & long_ret; |
93 + return (u_char *) & long_ret; |
89 +#else |
94 +#else |
90 case DISKIO_NREAD: |
95 case DISKIO_NREAD: |
91 #if defined(freebsd5) && __FreeBSD_version >= 500107 |
96 #if defined(freebsd5) && __FreeBSD_version >= 500107 |
92 long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ]; |
97 long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ]; |
93 @@ -675,6 +689,7 @@ |
98 @@ -857,6 +871,7 @@ |
94 case DISKIO_LA15: |
99 case DISKIO_LA15: |
95 long_ret = devloads[indx].la15; |
100 long_ret = devloads[indx].la15; |
96 return (u_char *) & long_ret; |
101 return (u_char *) & long_ret; |
97 +#endif |
102 +#endif |
98 |
103 |
99 default: |
104 default: |
100 ERROR_MSG("diskio.c: don't know how to handle this request."); |
105 ERROR_MSG("diskio.c: don't know how to handle this request."); |
101 Index: agent/mibgroup/ucd-snmp/memory_solaris2.c |
106 Index: agent/mibgroup/ucd-snmp/memory_solaris2.c |
102 --- agent/mibgroup/ucd-snmp/memory_solaris2.c.orig 2008-10-21 23:10:43.000000000 +0200 |
107 diff -Nau agent/mibgroup/ucd-snmp/memory_solaris2.c.orig agent/mibgroup/ucd-snmp/memory_solaris2.c |
103 +++ agent/mibgroup/ucd-snmp/memory_solaris2.c 2010-10-09 09:08:23.000000000 +0200 |
108 --- agent/mibgroup/ucd-snmp/memory_solaris2.c.orig 2011-07-02 00:35:46.000000000 +0200 |
|
109 +++ agent/mibgroup/ucd-snmp/memory_solaris2.c 2011-09-15 09:22:50.264370106 +0200 |
104 @@ -1,3 +1,4 @@ |
110 @@ -1,3 +1,4 @@ |
105 +#undef _FILE_OFFSET_BITS /* swapctl doesn't support 64bit off_t */ |
111 +#undef _FILE_OFFSET_BITS /* swapctl doesn't support 64bit off_t */ |
106 #include <net-snmp/net-snmp-config.h> /* local SNMP configuration details */ |
112 #include <net-snmp/net-snmp-config.h> /* local SNMP configuration details */ |
107 #if HAVE_STRING_H |
113 #if HAVE_STRING_H |
108 #include <string.h> |
114 #include <string.h> |
109 Index: agent/mibgroup/ucd-snmp/proc.c |
115 Index: agent/mibgroup/ucd-snmp/proc.c |
110 --- agent/mibgroup/ucd-snmp/proc.c.orig 2010-07-29 16:58:47.000000000 +0200 |
116 diff -Nau agent/mibgroup/ucd-snmp/proc.c.orig agent/mibgroup/ucd-snmp/proc.c |
111 +++ agent/mibgroup/ucd-snmp/proc.c 2010-10-09 09:08:23.000000000 +0200 |
117 --- agent/mibgroup/ucd-snmp/proc.c.orig 2011-07-02 00:35:46.000000000 +0200 |
|
118 +++ agent/mibgroup/ucd-snmp/proc.c 2011-09-15 09:22:50.265801863 +0200 |
112 @@ -1,3 +1,6 @@ |
119 @@ -1,3 +1,6 @@ |
113 +#ifdef solaris2 |
120 +#ifdef solaris2 |
114 +#undef _FILE_OFFSET_BITS /* solaris procfs doesn't support 64bit off_t */ |
121 +#undef _FILE_OFFSET_BITS /* solaris procfs doesn't support 64bit off_t */ |
115 +#endif |
122 +#endif |
116 #include <net-snmp/net-snmp-config.h> |
123 #include <net-snmp/net-snmp-config.h> |
117 |
124 #include <net-snmp/net-snmp-features.h> |
118 #ifdef solaris2 |
125 |
119 Index: agent/mibgroup/util_funcs.c |
126 Index: agent/mibgroup/util_funcs.c |
120 --- agent/mibgroup/util_funcs.c.orig 2010-05-16 20:12:40.000000000 +0200 |
127 diff -Nau agent/mibgroup/util_funcs.c.orig agent/mibgroup/util_funcs.c |
121 +++ agent/mibgroup/util_funcs.c 2010-10-09 09:08:23.000000000 +0200 |
128 --- agent/mibgroup/util_funcs.c.orig 2011-07-02 00:35:46.000000000 +0200 |
122 @@ -457,6 +457,9 @@ |
129 +++ agent/mibgroup/util_funcs.c 2011-09-15 09:22:50.267863457 +0200 |
|
130 @@ -477,6 +477,9 @@ |
123 int fd[2][2], i, cnt; |
131 int fd[2][2], i, cnt; |
124 char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv, |
132 char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv, |
125 **aptr; |
133 **aptr; |
126 + |
134 + |
127 + *pid = -1; /* open_persist_pipe ignores return code but checks *pid */ |
135 + *pid = -1; /* open_persist_pipe ignores return code but checks *pid */ |
128 + |
136 + |
129 /* |
137 /* |
130 * Setup our pipes |
138 * Setup our pipes |
131 */ |
139 */ |
132 Index: agent/snmpd.c |
140 Index: agent/snmpd.c |
133 --- agent/snmpd.c.orig 2010-08-17 20:31:31.000000000 +0200 |
141 diff -Nau agent/snmpd.c.orig agent/snmpd.c |
134 +++ agent/snmpd.c 2010-10-09 09:08:23.000000000 +0200 |
142 --- agent/snmpd.c.orig 2011-07-02 00:35:46.000000000 +0200 |
135 @@ -429,7 +429,7 @@ |
143 +++ agent/snmpd.c 2011-09-15 09:22:41.994430685 +0200 |
|
144 @@ -440,7 +440,7 @@ |
|
145 int log_set = 0; |
136 int uid = 0, gid = 0; |
146 int uid = 0, gid = 0; |
137 int agent_mode = -1; |
147 int agent_mode = -1; |
138 char *cptr, **argvptr; |
|
139 - char *pid_file = NULL; |
148 - char *pid_file = NULL; |
140 + char *pid_file = "@l_prefix@/var/snmp/snmpd.pid"; |
149 + char *pid_file = "@l_prefix@/var/snmp/snmpd.pid"; |
141 char option_compatability[] = "-Le"; |
150 char option_compatability[] = "-Le"; |
142 #if HAVE_GETPID |
151 #if HAVE_GETPID |
143 int fd; |
152 int fd; |
144 Index: apps/snmptrapd.c |
153 Index: apps/snmptrapd.c |
145 --- apps/snmptrapd.c.orig 2010-08-13 20:50:07.000000000 +0200 |
154 diff -Nau apps/snmptrapd.c.orig apps/snmptrapd.c |
146 +++ apps/snmptrapd.c 2010-10-09 09:08:23.000000000 +0200 |
155 --- apps/snmptrapd.c.orig 2011-07-02 00:35:46.000000000 +0200 |
147 @@ -652,6 +652,7 @@ |
156 +++ apps/snmptrapd.c 2011-09-15 09:22:50.270293197 +0200 |
|
157 @@ -657,6 +657,7 @@ |
148 */ |
158 */ |
149 #if HAVE_GETPID |
159 #if HAVE_GETPID |
150 strcat(options, "p:"); |
160 strcat(options, "p:"); |
151 + parse_config_pidFile(NULL, "@l_prefix@/var/snmp/snmptrapd.pid"); |
161 + parse_config_pidFile(NULL, "@l_prefix@/var/snmp/snmptrapd.pid"); |
152 #endif |
162 #endif |
153 |
163 |
154 #ifdef WIN32 |
164 #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG |
155 Index: include/net-snmp/library/system.h |
165 Index: include/net-snmp/library/system.h |
156 --- include/net-snmp/library/system.h.orig 2010-03-25 16:06:26.000000000 +0100 |
166 diff -Nau include/net-snmp/library/system.h.orig include/net-snmp/library/system.h |
157 +++ include/net-snmp/library/system.h 2010-10-09 09:56:40.000000000 +0200 |
167 --- include/net-snmp/library/system.h.orig 2011-07-02 00:35:46.000000000 +0200 |
158 @@ -141,7 +141,8 @@ |
168 +++ include/net-snmp/library/system.h 2011-09-15 09:22:50.271350973 +0200 |
|
169 @@ -155,7 +155,8 @@ |
159 #endif |
170 #endif |
160 #ifndef HAVE_SETENV |
171 #ifndef HAVE_SETENV |
161 NETSNMP_IMPORT |
172 NETSNMP_IMPORT |
162 - int setenv(const char *, const char *, int); |
173 - int setenv(const char *, const char *, int); |
163 + int __netsnmp_setenv(const char *, const char *, int); |
174 + int __netsnmp_setenv(const char *, const char *, int); |
164 +# define setenv(a,b,c) __netsnmp_setenv(a,b,c) |
175 +# define setenv(a,b,c) __netsnmp_setenv(a,b,c) |
165 #endif |
176 #endif |
166 |
177 |
167 NETSNMP_IMPORT |
178 NETSNMP_IMPORT |
168 Index: include/net-snmp/system/freebsd8.h |
179 Index: include/net-snmp/system/freebsd8.h |
169 --- include/net-snmp/system/freebsd8.h.orig 2010-02-14 20:29:08.000000000 +0100 |
180 diff -Nau include/net-snmp/system/freebsd8.h.orig include/net-snmp/system/freebsd8.h |
170 +++ include/net-snmp/system/freebsd8.h 2010-10-09 09:08:23.000000000 +0200 |
181 --- include/net-snmp/system/freebsd8.h.orig 2011-07-02 00:35:46.000000000 +0200 |
|
182 +++ include/net-snmp/system/freebsd8.h 2011-09-15 09:22:50.272179012 +0200 |
171 @@ -1,3 +1,6 @@ |
183 @@ -1,3 +1,6 @@ |
172 +/* freebsd8 is a superset of freebsd7 */ |
184 +/* freebsd8 is a superset of freebsd7 */ |
173 +#include "freebsd7.h" |
185 +#include "freebsd7.h" |
174 +#define freebsd7 freebsd7 |
186 +#define freebsd7 freebsd7 |
175 /* freebsd8 is a superset of freebsd4 */ |
187 /* freebsd8 is a superset of freebsd4 */ |
176 #include "freebsd4.h" |
188 #include "freebsd7.h" |
177 #define freebsd4 freebsd4 |
189 #define freebsd7 freebsd7 |
178 Index: include/net-snmp/system/freebsd9.h |
190 Index: include/net-snmp/system/freebsd9.h |
179 --- include/net-snmp/system/freebsd9.h.orig 2010-10-09 09:08:23.000000000 +0200 |
191 diff -Nau include/net-snmp/system/freebsd9.h.orig include/net-snmp/system/freebsd9.h |
180 +++ include/net-snmp/system/freebsd9.h 2010-10-09 09:08:23.000000000 +0200 |
192 --- include/net-snmp/system/freebsd9.h.orig 1970-01-01 01:00:00.000000000 +0100 |
|
193 +++ include/net-snmp/system/freebsd9.h 2011-09-15 09:22:50.272889416 +0200 |
181 @@ -0,0 +1,3 @@ |
194 @@ -0,0 +1,3 @@ |
182 +/* freebsd9 is a superset of freebsd8 */ |
195 +/* freebsd9 is a superset of freebsd8 */ |
183 +#include "freebsd8.h" |
196 +#include "freebsd8.h" |
184 +#define freebsd8 freebsd8 |
197 +#define freebsd8 freebsd8 |
185 Index: snmplib/system.c |
198 Index: snmplib/system.c |
186 --- snmplib/system.c.orig 2010-07-29 16:58:47.000000000 +0200 |
199 diff -Nau snmplib/system.c.orig snmplib/system.c |
187 +++ snmplib/system.c 2010-10-09 09:08:23.000000000 +0200 |
200 --- snmplib/system.c.orig 2011-07-02 00:35:46.000000000 +0200 |
188 @@ -837,7 +837,7 @@ |
201 +++ snmplib/system.c 2011-09-15 09:22:50.274625796 +0200 |
|
202 @@ -1044,7 +1044,7 @@ |
189 |
203 |
190 #ifndef HAVE_SETENV |
204 #ifndef HAVE_SETENV |
191 int |
205 int |
192 -setenv(const char *name, const char *value, int overwrite) |
206 -setenv(const char *name, const char *value, int overwrite) |
193 +__netsnmp_setenv(const char *name, const char *value, int overwrite) |
207 +__netsnmp_setenv(const char *name, const char *value, int overwrite) |