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.
58 lines
1.9 KiB
58 lines
1.9 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;
|
|
|