darwin: add 32 bit close$NOCANCEL implementation

The link symbol for close$NOCANCEL is slightly different for 32 bit
builds.

PR-URL: https://github.com/libuv/libuv/pull/2309
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
ken-cunningham-webuse 2019-05-23 12:35:14 -07:00 committed by Ben Noordhuis
parent 9a41731949
commit ffad651b9d

View File

@ -526,8 +526,13 @@ int uv__close_nocancel(int fd) {
#if defined(__APPLE__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension"
#if defined(__LP64__)
extern int close$NOCANCEL(int);
return close$NOCANCEL(fd);
#else
extern int close$NOCANCEL$UNIX2003(int);
return close$NOCANCEL$UNIX2003(fd);
#endif
#pragma GCC diagnostic pop
#elif defined(__linux__)
return syscall(SYS_close, fd);