]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_snmp: Declare RONLY if net-snmp headers do not.
authorCorey Farrell <git@cfware.com>
Sun, 19 Nov 2017 02:25:50 +0000 (21:25 -0500)
committerCorey Farrell <git@cfware.com>
Sun, 19 Nov 2017 02:28:23 +0000 (20:28 -0600)
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

res/snmp/agent.c

index 7ff78d56e3e7b066219f9e5d5ad429435e4d1273..b8fcb07f6b04fec299a30f2ada3d1f8abe067d47 100644 (file)
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
 
+#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"