From: Michiel van Baak Date: Wed, 10 Dec 2008 11:34:09 +0000 (+0000) Subject: Make res_snmp.so compile on OpenBSD. X-Git-Tag: 1.6.2.0-beta1~676 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef965af2707d881fa9ecd81a07d602433b152f24;p=thirdparty%2Fasterisk.git Make res_snmp.so compile on OpenBSD. OpenBSD uses an old version of gcc which throws an error if you use a macro that's not #defined git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162583 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/snmp/agent.c b/res/snmp/agent.c index c0eda9fe4b..225fb63a76 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -47,6 +47,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #define HAVE_DMALLOC_H 0 /* XXX we shouldn't do this */ #endif +#if defined(__OpenBSD__) +/* + * OpenBSD uses old "legacy" cc which has a rather pedantic builtin preprocessor. + * Using a macro which is not #defined throws an error. + */ +#define __NetBSD_Version__ 0 +#endif + #include #include #include