From: Nikos Mavrogiannopoulos Date: Thu, 6 Nov 2014 20:35:21 +0000 (+0100) Subject: applied patch by A. Klitzing to improve compatibile with some apple systems X-Git-Tag: gnutls_3_4_0~666 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbfbd5e39742e3fef7546371a5928236fcefe3b3;p=thirdparty%2Fgnutls.git applied patch by A. Klitzing to improve compatibile with some apple systems Signed-off-by: Nikos Mavrogiannopoulos --- diff --git a/gl/unistd.in.h b/gl/unistd.in.h index 6c1506b8b7..1aae789afe 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -401,6 +401,13 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ +# include "TargetConditionals.h" +# if !defined(TARGET_OS_IPHONE) && !defined(TARGET_IPHONE_SIMULATOR) +# define APPLE_USE_CRT_EXTERNS +# endif +# endif +# +# ifdef APPLE_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else diff --git a/src/gl/unistd.in.h b/src/gl/unistd.in.h index bbbfd75bdd..4e70ba464d 100644 --- a/src/gl/unistd.in.h +++ b/src/gl/unistd.in.h @@ -401,6 +401,13 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ +# include "TargetConditionals.h" +# if !defined(TARGET_OS_IPHONE) && !defined(TARGET_IPHONE_SIMULATOR) +# define APPLE_USE_CRT_EXTERNS +# endif +# endif +# +# ifdef APPLE_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else