--- src/cqueues.h 2020-07-26 19:34:16.000000000 +0800 +++ src/cqueues.h 2026-06-21 01:32:05.000000000 +0800 @@ -419,11 +419,15 @@ static inline void cqs_closefd(int *fd) { if (*fd != -1) { -#if __APPLE__ - /* Do we need bother with close$NOCANCEL$UNIX2003? */ +#ifdef __APPLE__ +#ifdef __LP64__ extern int close$NOCANCEL(int); close$NOCANCEL(*fd); #else + extern int close$NOCANCEL$UNIX2003(int); + close$NOCANCEL$UNIX2003(*fd); +#endif +#else close(*fd); #endif *fd = -1;