From 62abb0465c0840a06703256e51fccdbec50294c0 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Tue, 30 Jan 2024 02:52:49 +0100 Subject: [PATCH] fix [-Wunused-variable] for keep* variables --- rtsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtsp.c b/rtsp.c index 6ac85050..ee8f2971 100644 --- a/rtsp.c +++ b/rtsp.c @@ -5601,7 +5601,7 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) { } else { size_of_reply = sizeof(SOCKADDR); if (getsockname(conn->fd, (struct sockaddr *)&conn->local, &size_of_reply) == 0) { - +#ifndef COMPILE_FOR_OPENBSD // Thanks to https://holmeshe.me/network-essentials-setsockopt-SO_KEEPALIVE/ for this. // turn on keepalive stuff -- wait for keepidle + (keepcnt * keepinttvl time) seconds @@ -5623,7 +5623,6 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) { #define KEEP_ALIVE_OR_IDLE_OPTION TCP_KEEPIDLE #endif -#ifndef COMPILE_FOR_OPENBSD if (setsockopt(conn->fd, SOL_OPTION, KEEP_ALIVE_OR_IDLE_OPTION, (void *)&keepAliveIdleTime, sizeof(keepAliveIdleTime))) { debug(1, "can't set the keepidle wait time");