Support bsd in fd_utils
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user