]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
applied patch by A. Klitzing to improve compatibile with some apple systems
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 6 Nov 2014 20:35:21 +0000 (21:35 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 6 Nov 2014 20:35:21 +0000 (21:35 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
gl/unistd.in.h
src/gl/unistd.in.h

index 6c1506b8b788d5e1b94404c141eee9242e98ade5..1aae789afe0fca18b5c48280b7d5b16a0f9e7ce6 100644 (file)
@@ -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
index bbbfd75bdd610ab8e732d045fbede3880507b278..4e70ba464d8e5158d2ceda82ff24e34f92876ad4 100644 (file)
@@ -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