From: Corey Farrell Date: Sun, 19 Nov 2017 02:25:50 +0000 (-0500) Subject: res_snmp: Declare RONLY if net-snmp headers do not. X-Git-Tag: 13.19.0-rc1~112^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68e54b7ab5132c4b4b2c1da6367dec96dd9f455;p=thirdparty%2Fasterisk.git res_snmp: Declare RONLY if net-snmp headers do not. Some net-snmp builds do not provide the RONLY declare, only NETSNMP_OLDAPI_RONLY. Map RONLY to NETSNMP_OLDAPI_RONLY to get around this error. Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577 --- diff --git a/res/snmp/agent.c b/res/snmp/agent.c index 9d1528dde9..7cd8955597 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -63,6 +63,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include +#if !defined(RONLY) && defined(NETSNMP_OLDAPI_RONLY) +#define RONLY NETSNMP_OLDAPI_RONLY +#endif + #include "asterisk/paths.h" /* need ast_config_AST_SOCKET */ #include "asterisk/channel.h" #include "asterisk/logger.h"