-Coders,

a number of systems (including OSX, AIX, IRIX and Tru64) have known problems
when using nlist/klookup (/dev/kmem access) for a number of reasons. A minimal
stop-gap fix is to turn off nlist/klookup usage completely, most conveniently
done by "configure --without-kmem-usage" (which prevents NETSNMP_CAN_USE_NLIST
from being defined).

However, this configuration currently either:
- requires you to build a crippled mini agent, or
- otherwise yields into compile errors saying that NETSNMP_KLOOKUP has been
used, but couldn't be found, because it's only defined when
NETSNMP_CAN_USE_NLIST is defined, too.

The attached trivial patch effectively defines NETSNMP_KLOOKUP to always "return
false" (0) if NETSNMP_CAN_USE_NLIST is *not* defined, thereby fixing the build
error. Successfully tested on AIX 5.3 and IRIX 6.5.  Linux and Solaris don't use
nlist/klookup at all and will not be affected by nature.

I think it's a small, safe patch that helps to provide a fix for a major issue
(nlist problems). I'm calling for votes to include this in 5.4.


+Thomas

PS. I'm also begging the honorable Release Manager to seriously consider to
apply this for 5.4.rc1 if just not enough people had the chance to comment/vote
on this before rc1 due to the short notice (my fault, due to lack of time).

-- 
Thomas Anders (thomas.anders at blue-cable.de)

Index: agent/kernel.h
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/kernel.h,v
retrieving revision 5.4
diff -u -r5.4 kernel.h
--- agent/kernel.h      15 Oct 2006 17:03:42 -0000      5.4
+++ agent/kernel.h      31 Oct 2006 00:29:04 -0000
@@ -3,6 +3,8 @@
 extern void     init_kmem(const char *);
 extern int      klookup(unsigned long, char *, int);
 #define NETSNMP_KLOOKUP(x,y,z) klookup((unsigned long) x,y,z)
+#else
+#define NETSNMP_KLOOKUP(x,y,z) (0)
 #endif

 #if HAVE_KVM_H
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to