diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 433a6c519..5119ed47f 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -415,6 +415,12 @@ fn main() { // poll() on various versions of macOS are janky, so only use it // on non-macOS unix-likes. This matches the official default // build configuration as well. + // + // curl 8.x gates select.c on HAVE_POLL (HAVE_POLL_FINE is the + // pre-8.x name). Without it libcurl silently falls back to + // select(), and any socket with fd >= FD_SETSIZE (1024) fails + // with CURLE_COULDNT_CONNECT right after the TCP handshake. + .define("HAVE_POLL", None) .define("HAVE_POLL_FINE", None); }