Fix compatibility with SOL_TCP and Darwin

Under Darwin SOL_TCP is not defined. Use IPPROTO_TCP instead.
Other part of SPICE server uses this constant instead already.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-04-15 14:32:10 +01:00 committed by Frediano Ziglio
parent 717ed19a8b
commit 1fbb58ac52

View File

@ -200,7 +200,7 @@ handle_client(int new_sock)
}
int enable = 1;
setsockopt(new_sock, SOL_TCP, TCP_NODELAY, (const void *) &enable, sizeof(enable));
setsockopt(new_sock, IPPROTO_TCP, TCP_NODELAY, (const void *) &enable, sizeof(enable));
// wait header
wait_for(new_sock, POLLIN);