From 0c619f5700c854a0cde0fa9834f9ca9a51afa675 Mon Sep 17 00:00:00 2001 From: fduncanh Date: Sat, 4 Sep 2021 01:13:12 -0400 Subject: [PATCH] Add macOS-specific TCP variables (from github.com/Loxodromics/ludimus 5c2e40f) SOL_TCP and TCP_KEEPIDLE are defined in Linux but not MacOS If they are undefined, replace SOL_TCP by IPPROT0_TCP and replace TCP_KEEPIDLE by TCP_KEEPALIVE --- lib/raop_rtp_mirror.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/raop_rtp_mirror.c b/lib/raop_rtp_mirror.c index 01ebf48..5e38220 100755 --- a/lib/raop_rtp_mirror.c +++ b/lib/raop_rtp_mirror.c @@ -30,6 +30,13 @@ #include "mirror_buffer.h" #include "stream.h" +/* for MacOS, where SOL_TCP and TCP_KEEPIDLE are not defined */ +#if !defined(SOL_TCP) && defined(IPPROTO_TCP) +#define SOL_TCP IPPROTO_TCP +#endif +#if !defined(TCP_KEEPIDLE) && defined(TCP_KEEPALIVE) +#define TCP_KEEPIDLE TCP_KEEPALIVE +#endif struct h264codec_s { unsigned char compatibility;