diff --git a/src/unix/core.c b/src/unix/core.c index 936d8950..a409f5dd 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -61,6 +61,12 @@ # include #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)