build: fix ios build error

`_NSGetEnviron()` is not available on that platform.

PR-URL: https://github.com/libuv/libuv/pull/2449
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Signed-off-by: MaYuming <maym@appexnetworks.com>
This commit is contained in:
MaYuming 2019-09-04 08:37:34 -04:00 committed by Ben Noordhuis
parent 7d950c0d10
commit 5ba93edef6

View File

@ -49,17 +49,22 @@
# include <sys/wait.h>
#endif
#ifdef __APPLE__
# include <crt_externs.h>
# include <mach-o/dyld.h> /* _NSGetExecutablePath */
#if defined(__APPLE__)
# include <sys/filio.h>
# if defined(O_CLOEXEC)
# define UV__O_CLOEXEC O_CLOEXEC
# endif
# endif /* defined(O_CLOEXEC) */
# endif /* defined(__APPLE__) */
#if defined(__APPLE__) && !TARGET_OS_IPHONE
# include <crt_externs.h>
# include <mach-o/dyld.h> /* _NSGetExecutablePath */
# define environ (*_NSGetEnviron())
#else
#else /* defined(__APPLE__) && !TARGET_OS_IPHONE */
extern char** environ;
#endif
#endif /* !(defined(__APPLE__) && !TARGET_OS_IPHONE) */
#if defined(__DragonFly__) || \
defined(__FreeBSD__) || \