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
This commit is contained in:
fduncanh
2021-09-04 01:13:12 -04:00
parent ab77b5653c
commit 0c619f5700

View File

@@ -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;