freebsd: use accept4, introduced in version 10
This commit is contained in:
parent
9aa48312bc
commit
4c47fcd787
@ -61,6 +61,12 @@
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#if __FreeBSD__ >= 10
|
||||
# define uv__accept4 accept4
|
||||
# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
|
||||
# define UV__SOCK_CLOEXEC SOCK_CLOEXEC
|
||||
#endif
|
||||
|
||||
static void uv__run_pending(uv_loop_t* loop);
|
||||
|
||||
/* Verify that uv_buf_t is ABI-compatible with struct iovec. */
|
||||
@ -371,7 +377,7 @@ int uv__accept(int sockfd) {
|
||||
assert(sockfd >= 0);
|
||||
|
||||
while (1) {
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || __FreeBSD__ >= 10
|
||||
static int no_accept4;
|
||||
|
||||
if (no_accept4)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user