Support bsd in fd_utils

This commit is contained in:
Nils O. Selåsdal
2025-06-27 23:14:38 +02:00
parent 01db95842d
commit f0685abf62
+5
View File
@@ -7,6 +7,11 @@
#include <sys/types.h>
#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);