]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix the detection of snmp_select_info2() 7826/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 15 May 2019 16:35:37 +0000 (18:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 15 May 2019 16:38:22 +0000 (18:38 +0200)
We did not properly check whether snmp_select_info2() was available,
resulting in this function not being used even when supported.

m4/pdns_with_net_snmp.m4

index 2da80c75fc80d873a71eb3793b7df3e354c2c10c..d4cfcfac6881ce1bdb06fa48253981c0307fe9d3 100644 (file)
@@ -11,7 +11,10 @@ AC_DEFUN([PDNS_WITH_NET_SNMP], [
     AS_IF([test "x$with_net_snmp" = "xyes" -o "x$with_net_snmp" = "xauto"], [
       AC_CHECK_PROG([NET_SNMP_CFLAGS], [net-snmp-config], [`net-snmp-config --cflags`])
       AC_CHECK_PROG([NET_SNMP_LIBS], [net-snmp-config], [`net-snmp-config --netsnmp-agent-libs`])
-      AC_CHECK_DECLS([snmp_select_info2], [ : ], [ : ],
+      AC_CHECK_DECLS([snmp_select_info2], [
+          AC_DEFINE([HAVE_SNMP_SELECT_INFO2], [1], [define to 1 if snmp_select_info2 is available.])
+        ],
+        [ : ],
         [AC_INCLUDES_DEFAULT
           #include <net-snmp/net-snmp-config.h>
           #include <net-snmp/definitions.h>