[Asterisk-code-review] res snmp: Declare RONLY if net-snmp headers do not. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Sat Nov 18 20:28:30 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7287


Change subject: res_snmp: Declare RONLY if net-snmp headers do not.
......................................................................

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
---
M res/snmp/agent.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/7287/1

diff --git a/res/snmp/agent.c b/res/snmp/agent.c
index 9d1528d..7cd8955 100644
--- a/res/snmp/agent.c
+++ b/res/snmp/agent.c
@@ -63,6 +63,10 @@
 #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"

-- 
To view, visit https://gerrit.asterisk.org/7287
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577
Gerrit-Change-Number: 7287
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171118/08aaaaa4/attachment-0001.html>


More information about the asterisk-code-review mailing list