]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
fix [-Wunused-variable] for keep* variables
authorKlemens Nanni <kn@openbsd.org>
Tue, 30 Jan 2024 01:52:49 +0000 (02:52 +0100)
committerKlemens Nanni <kn@openbsd.org>
Tue, 30 Jan 2024 01:52:49 +0000 (02:52 +0100)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index 6ac850504305f16f948b0a5b0e4d490ae3fd13d2..ee8f2971e9cc1fc57e2078b017d1c0f457f6c125 100644 (file)
--- 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");