From 815b0766eddf1ef6ebc9481c432b59d0477eb74d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 7 Apr 2020 08:42:20 -0400 Subject: [PATCH] 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 --- src/unix/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/core.c b/src/unix/core.c index c3812d2d..949eefae 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -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