unix: fix compilation on macOS 32-bit architectures
In commit 2475296c (build: make code compilable for iOS on Xcode,
2020-01-18, v1.35.0~47) we added a `defined(TARGET_OS_IPHONE)`
preprocessor condition, but `TARGET_OS_IPHONE` is always defined on
Apple to either 0 or 1. On 32-bit macOS architectures this
leads to an undefined symbol reference to `_close$NOCANCEL`.
Fix the preprocessor condition to use just `TARGET_OS_IPHONE`.
Refs: https://github.com/libuv/libuv/pull/2639
PR-URL: https://github.com/libuv/libuv/pull/2776
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
cd11c2b1ea
commit
815b0766ed
@ -519,7 +519,7 @@ int uv__close_nocancel(int fd) {
|
||||
#if defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension"
|
||||
#if defined(__LP64__) || defined(TARGET_OS_IPHONE)
|
||||
#if defined(__LP64__) || TARGET_OS_IPHONE
|
||||
extern int close$NOCANCEL(int);
|
||||
return close$NOCANCEL(fd);
|
||||
#else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user