From 336a05fe3af3ad3a65636df8cee7385e4a991c2f Mon Sep 17 00:00:00 2001 From: tilghman Date: Sun, 30 Aug 2009 18:37:17 +0000 Subject: Various patches, to enable Asterisk to once again compile on Mac OS X. One note on defining _POSIX_C_SOURCE: while this feature test macro works to require certain behaviors on Linux, it works differently on *BSD platforms to REMOVE certain API calls that are not in the POSIX specification, such as vasprintf(3). Thus, defining it while depending upon vasprintf (and other extensions to the POSIX standard) to be defined is a recipe to ensure that Asterisk is only buildable on Linux. Hence, this define which was meant to INCREASE portability, effectively ensures the opposite. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@214863 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/asterisk.h') diff --git a/include/asterisk.h b/include/asterisk.h index 049490bc9..c62cb726b 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -20,6 +20,8 @@ #include "asterisk/autoconfig.h" +#ifndef __Darwin__ + #define _POSIX_C_SOURCE 200112L #define _XOPEN_SOURCE 600 @@ -35,6 +37,8 @@ #endif */ +#endif /* __Darwin__ */ + #if !defined(NO_MALLOC_DEBUG) && !defined(STANDALONE) && defined(MALLOC_DEBUG) #include "asterisk/astmm.h" #endif -- cgit v1.2.3