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

Joshua Colp asteriskteam at digium.com
Mon Nov 20 12:28:31 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7286 )

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(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/res/snmp/agent.c b/res/snmp/agent.c
index 7ff78d5..b8fcb07 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/7286
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577
Gerrit-Change-Number: 7286
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171120/038e85ea/attachment.html>


More information about the asterisk-code-review mailing list