From f0685abf620ad7b6aa183069dfbd474a675d6bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 27 Jun 2025 23:14:38 +0200 Subject: [PATCH] Support bsd in fd_utils --- src/fd_utils.c | 5 +++++ 1 file changed, 5 insertions(+) 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);