You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
3.0 KiB
86 lines
3.0 KiB
--- snmplib/system.c.dist Thu Aug 7 16:42:30 2003 |
|
+++ snmplib/system.c Thu Aug 7 16:44:19 2003 |
|
@@ -751,7 +751,7 @@ |
|
|
|
#ifndef HAVE_SETENV |
|
int |
|
-setenv(const char *name, const char *value, int overwrite) |
|
+__netsnmp_setenv(const char *name, const char *value, int overwrite) |
|
{ |
|
char *cp; |
|
int ret; |
|
--- include/net-snmp/library/system.h.dist Thu Aug 7 16:41:56 2003 |
|
+++ include/net-snmp/library/system.h Thu Aug 7 16:44:45 2003 |
|
@@ -87,7 +87,8 @@ |
|
char *strdup(const char *); |
|
#endif |
|
#ifndef HAVE_SETENV |
|
- int setenv(const char *, const char *, int); |
|
+ int __netsnmp_setenv(const char *, const char *, int); |
|
+# define setenv(a,b,c) __netsnmp_setenv(a,b,c) |
|
#endif |
|
|
|
int calculate_time_diff(struct timeval *, |
|
--- agent/mibgroup/host/hr_swinst.c.dist 2003-08-08 07:59:16.000000000 +0200 |
|
+++ agent/mibgroup/host/hr_swinst.c 2003-08-08 09:35:50.000000000 +0200 |
|
@@ -202,10 +202,10 @@ |
|
* XXX distinguish between rpm-2.5.x and rpm-2.9x |
|
*/ |
|
#ifdef HAVE_RPMGETPATH |
|
- rpmReadConfigFiles(NULL, NULL); |
|
+ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL); |
|
swi->swi_dbpath = rpmGetPath("%{_dbpath}", NULL); |
|
#else |
|
- rpmReadConfigFiles(NULL, NULL, NULL, 0); |
|
+ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL, NULL, 0); |
|
swi->swi_dbpath = rpmGetVar(RPMVAR_DBPATH); |
|
#endif |
|
if (swi->swi_directory != NULL) |
|
@@ -557,7 +557,8 @@ |
|
return; |
|
if (rpmdbOpen("", &swi->swi_rpmdb, O_RDONLY, 0644) != 0) |
|
swi->swi_index = -1; |
|
- Check_HRSW_cache(swi); |
|
+ else |
|
+ Check_HRSW_cache(swi); |
|
#else |
|
if (swi->swi_directory != NULL) { |
|
if (swi->swi_dp != NULL) { |
|
@@ -676,6 +677,9 @@ |
|
{ |
|
SWI_t *swi = &_myswi; /* XXX static for now */ |
|
|
|
+ if (swi->swi_index == -1) |
|
+ return; |
|
+ |
|
#ifdef HAVE_LIBRPM |
|
rpmdbClose(swi->swi_rpmdb); /* or only on finishing ? */ |
|
swi->swi_rpmdb = NULL; |
|
--- agent/mibgroup/ucd-snmp/memory_solaris2.c.dist Tue Aug 19 09:46:12 2003 |
|
+++ agent/mibgroup/ucd-snmp/memory_solaris2.c Tue Aug 19 09:51:30 2003 |
|
@@ -1,3 +1,4 @@ |
|
+#undef _FILE_OFFSET_BITS /* swapctl doesn't support 64bit off_t */ |
|
#include <net-snmp/net-snmp-config.h> /* local SNMP configuration details */ |
|
#if HAVE_STRING_H |
|
#include <string.h> |
|
--- agent/mibgroup/ucd-snmp/proc.c.dist 2003-08-19 10:26:49.000000000 +0200 |
|
+++ agent/mibgroup/ucd-snmp/proc.c 2003-08-19 10:27:45.000000000 +0200 |
|
@@ -1,3 +1,6 @@ |
|
+#ifdef solaris2 |
|
+#undef _FILE_OFFSET_BITS /* solaris procfs doesn't support 64bit off_t */ |
|
+#endif |
|
#include <net-snmp/net-snmp-config.h> |
|
|
|
#ifdef solaris2 |
|
--- agent/mibgroup/util_funcs.c.dist 2003-08-26 11:37:52.000000000 +0200 |
|
+++ agent/mibgroup/util_funcs.c 2003-08-26 11:39:00.000000000 +0200 |
|
@@ -372,6 +372,9 @@ |
|
int fd[2][2], i, cnt; |
|
char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv, |
|
**aptr; |
|
+ |
|
+ *pid = -1; /* open_persist_pipe ignores return code but checks *pid */ |
|
+ |
|
/* |
|
* Setup our pipes |
|
*/
|
|
|