mirror of
https://github.com/curl/curl.git
synced 2026-07-24 06:37:15 +03:00
build: disable TCP_NODELAY for emscripten
In WebAssembly, using `TCP_NODELAY` fails with: ``` * Could not set TCP_NODELAY: Protocol not available ``` Add a new feature macro in `curl_setup.h` telling whether `TCP_NODELAY` is known to be supported at runtime, when defined at compile-time. Keep `TCP_NODELAY` guards at their current positions to ensure the necessary headers (e.g. `netinet/tcp.h` and `netinet/in.h`) define it. Reported-by: Jeroen Ooms Fixes #17974 Closes #18155
This commit is contained in:
parent
74ba04f5b2
commit
06c12cc08b
4 changed files with 11 additions and 6 deletions
|
|
@ -109,7 +109,7 @@ static void set_ipv6_v6only(curl_socket_t sockfd, int on)
|
|||
|
||||
static void tcpnodelay(struct Curl_easy *data, curl_socket_t sockfd)
|
||||
{
|
||||
#ifdef TCP_NODELAY
|
||||
#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
|
||||
curl_socklen_t onoff = (curl_socklen_t) 1;
|
||||
int level = IPPROTO_TCP;
|
||||
char buffer[STRERROR_LEN];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue