Land #745, fix nc build on macOS
This commit is contained in:
commit
5c7021517a
@ -6,8 +6,7 @@
|
||||
#ifndef _WIN32
|
||||
#include_next <sys/socket.h>
|
||||
|
||||
#if !defined(SOCK_NONBLOCK) || !defined(SOCK_CLOEXEC)
|
||||
#define NEED_SOCKET_FLAGS
|
||||
#if defined(NEED_SOCKET_FLAGS)
|
||||
int _socket(int domain, int type, int protocol);
|
||||
#ifndef SOCKET_FLAGS_PRIV
|
||||
#define socket(d, t, p) _socket(d, t, p)
|
||||
|
@ -10,6 +10,7 @@
|
||||
#endif
|
||||
|
||||
#if !defined(SOCK_NONBLOCK) || !defined(SOCK_CLOEXEC)
|
||||
#define NEED_SOCKET_FLAGS
|
||||
#define SOCK_CLOEXEC 0x8000 /* set FD_CLOEXEC */
|
||||
#define SOCK_NONBLOCK 0x4000 /* set O_NONBLOCK */
|
||||
int bsd_socketpair(int domain, int type, int protocol, int socket_vector[2]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user