Fix macOS macro because of GNU Mach

This commit is contained in:
yangfl 2018-06-01 13:02:11 +08:00 committed by iphydf
parent 184129b9be
commit 1af1b61e9d
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -379,7 +379,7 @@ int set_socket_nonblock(Socket sock)
*/
int set_socket_nosigpipe(Socket sock)
{
#if defined(__MACH__)
#if defined(__APPLE__)
int set = 1;
return setsockopt(sock.socket, SOL_SOCKET, SO_NOSIGPIPE, (const char *)&set, sizeof(int)) == 0;
#else