From 392ef589a6a3941451813009c29deac92602b171 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Dec 2024 14:38:40 +0100 Subject: [PATCH] Fix macOS build Signed-off-by: falkTX --- src/socket.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/socket.c b/src/socket.c index 37c4f70..00274cc 100644 --- a/src/socket.c +++ b/src/socket.c @@ -161,16 +161,16 @@ int socket_start(int socket_port, int feedback_port, int buffer_size) if (feedback_port != 0) setsockopt(g_fbserverfd, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)); - /* Set TCP_NODELAY */ - setsockopt(g_serverfd, SOL_TCP, TCP_NODELAY, &value, sizeof(value)); - if (feedback_port != 0) - setsockopt(g_fbserverfd, SOL_TCP, TCP_NODELAY, &value, sizeof(value)); - /* Increase socket size */ value = 131071; setsockopt(g_serverfd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)); if (feedback_port != 0) setsockopt(g_fbserverfd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)); + + /* Set TCP_NODELAY */ + setsockopt(g_serverfd, IPPROTO_TCP, TCP_NODELAY, &value, sizeof(value)); + if (feedback_port != 0) + setsockopt(g_fbserverfd, IPPROTO_TCP, TCP_NODELAY, &value, sizeof(value)); #endif /* Startup the socket struct */