]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Various patches, to enable Asterisk to once again compile on Mac OS X.
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 30 Aug 2009 18:37:17 +0000 (18:37 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 30 Aug 2009 18:37:17 +0000 (18:37 +0000)
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: https://origsvn.digium.com/svn/asterisk/trunk@214863 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk.h
main/poll.c

index 049490bc975b7c7a86ba6d7c159fe14e0ca16094..c62cb726b02d5b0d7f83335c64ad50640e4dd777 100644 (file)
@@ -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
index 62e681dca872a2f24b16e21741f4f1fa83a13acd..fb0ccb2acbe2d956c0167567e13de5046eb6ca22 100644 (file)
 
 #ifdef AST_POLL_COMPAT
 
+#ifndef MAX
+#define MAX(a,b)       a > b ? a : b
+#endif
+
 /*---------------------------------------------------------------------------*\
                             Private Functions
 \*---------------------------------------------------------------------------*/