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