Skip to content

Commit 28cafd9

Browse files
committed
Make program_options compile on iOS.
Patch from Alejandro Isaza. Fixes #5053. [SVN r67768]
1 parent 84415c1 commit 28cafd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/parsers.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
// See: http://article.gmane.org/gmane.comp.lib.boost.devel/103843
4646
// See: http://lists.gnu.org/archive/html/bug-guile/2004-01/msg00013.html
4747
#if defined(__APPLE__) && defined(__DYNAMIC__)
48-
#include <crt_externs.h>
48+
// The proper include for this is crt_externs.h, however it's not
49+
// available on iOS. The right replacement is not known. See
50+
// https://svn.boost.org/trac/boost/ticket/5053
51+
extern "C" { extern char ***_NSGetEnviron(void); }
4952
#define environ (*_NSGetEnviron())
5053
#else
5154
#if defined(__MWERKS__)

0 commit comments

Comments
 (0)