From 28cafd9bd9196bad59c868477ceb398374ede952 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 8 Jan 2011 09:57:31 +0000 Subject: [PATCH] Make program_options compile on iOS. Patch from Alejandro Isaza. Fixes #5053. [SVN r67768] --- src/parsers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parsers.cpp b/src/parsers.cpp index bc3b858..8949bc8 100644 --- a/src/parsers.cpp +++ b/src/parsers.cpp @@ -45,7 +45,10 @@ // See: http://article.gmane.org/gmane.comp.lib.boost.devel/103843 // See: http://lists.gnu.org/archive/html/bug-guile/2004-01/msg00013.html #if defined(__APPLE__) && defined(__DYNAMIC__) -#include +// The proper include for this is crt_externs.h, however it's not +// available on iOS. The right replacement is not known. See +// https://svn.boost.org/trac/boost/ticket/5053 +extern "C" { extern char ***_NSGetEnviron(void); } #define environ (*_NSGetEnviron()) #else #if defined(__MWERKS__)