diff --git a/src/fd_utils.c b/src/fd_utils.c index e14fb12..6862472 100644 --- a/src/fd_utils.c +++ b/src/fd_utils.c @@ -7,6 +7,11 @@ #include #include "ucore/fd_utils.h" +/* bsd variants use TCP_KEEPALIVE */ +#if defined(TCP_KEEPALIVE) && !defined(TCP_KEEPIDLE) +#define TCP_KEEPIDLE TCP_KEEPALIVE +#endif + int uc_set_nonblocking(int fd) { int flags = fcntl(fd,F_GETFL,NULL);