alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.01k stars 234 forks source link

Fix TCP_NODELAY not defined for static builds on Unix #381

Closed sagebind closed 3 years ago

sagebind commented 3 years ago

The TCP_NODELAY macro/constant was not being defined during compilation for the bundled libcurl build on Unix systems because netinet/tcp.h was not being included. It is difficult to verify that this is working properly without a debugger or strace. I've confirmed this fix on Linux and macOS.

Also rearrange some of the defines to help keep the build script somewhat organized.

Fixes #379.

alexcrichton commented 3 years ago

👍