SOL_TCP and TCP_KEEPIDLE undefined on macOS
Building usbredir on macOS 10.14.2 fails with:
usbredirserver.c:376:39: error: use of undeclared identifier 'SOL_TCP'
if (setsockopt(client_fd, SOL_TCP, TCP_KEEPIDLE, &optval, optlen) == -1) {
^
usbredirserver.c:376:48: error: use of undeclared identifier 'TCP_KEEPIDLE'
if (setsockopt(client_fd, SOL_TCP, TCP_KEEPIDLE, &optval, optlen) == -1) {
^
usbredirserver.c:383:39: error: use of undeclared identifier 'SOL_TCP'
if (setsockopt(client_fd, SOL_TCP, TCP_KEEPINTVL, &optval, optlen) == -1) {
^
usbredirserver.c:390:39: error: use of undeclared identifier 'SOL_TCP'
if (setsockopt(client_fd, SOL_TCP, TCP_KEEPCNT, &optval, optlen) == -1) {
^
4 errors generated.
Following link suggests replacing SOL_TCP --> IPPROTO_TCP and TCP_KEEPIDLE --> TCP_KEEPALIVE:
https://stackoverflow.com/questions/15860127/how-to-configure-tcp-keepalive-under-mac-os-x