summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-11-06 21:35:21 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-11-06 21:35:21 +0100
commitcbfbd5e39742e3fef7546371a5928236fcefe3b3 (patch)
tree63859ff5f0f370595453de091689bb962b0c5fbf /gl
parentb91172de2df41ff46e73078f5276a9403ed0e100 (diff)
downloadgnutls-cbfbd5e39742e3fef7546371a5928236fcefe3b3.tar.gz
applied patch by A. Klitzing to improve compatibile with some apple systems
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'gl')
-rw-r--r--gl/unistd.in.h7
1 files changed, 7 insertions, 0 deletions
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 <crt_externs.h>
# define environ (*_NSGetEnviron ())
# else