summaryrefslogtreecommitdiff
path: root/ext/snmp
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-10-17 06:39:55 +0000
committerfoobar <sniper@php.net>2002-10-17 06:39:55 +0000
commit9870028d05c8bea71f2b08bcfa156cab7a790284 (patch)
treeba6e18e70697a4c0a7b8c2a0a2987fe491c61d75 /ext/snmp
parentde597eb3c675f315ff26092cc012693f534a0fd7 (diff)
downloadphp-git-9870028d05c8bea71f2b08bcfa156cab7a790284.tar.gz
Fix this for Wez and his antique ucd-snmp
Diffstat (limited to 'ext/snmp')
-rw-r--r--ext/snmp/config.m42
-rw-r--r--ext/snmp/snmp.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/ext/snmp/config.m4 b/ext/snmp/config.m4
index 9c3b859c20..4d1dd0831a 100644
--- a/ext/snmp/config.m4
+++ b/ext/snmp/config.m4
@@ -91,6 +91,8 @@ if test "$PHP_SNMP" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(snmp, $SNMP_LIBDIR, SNMP_SHARED_LIBADD)
fi
+ AC_CHECK_FUNCS(snmp_parse_oid)
+
PHP_NEW_EXTENSION(snmp, snmp.c, $ext_shared)
PHP_SUBST(SNMP_SHARED_LIBADD)
AC_DEFINE(HAVE_SNMP,1,[ ])
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 32f104ccd6..5a0ee9dffe 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -90,6 +90,11 @@
#include "version.h"
#endif
+/* For really old ucd-snmp versions.. */
+#ifndef HAVE_SNMP_PARSE_OID
+#define snmp_parse_oid read_objid
+#endif
+
/* ucd-snmp 3.3.1 changed the name of a few #defines... They've been changed back to the original ones in 3.5.3! */
#ifndef SNMP_MSG_GET
#define SNMP_MSG_GET GET_REQ_MSG