mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 21:24:43 +02:00
SIGPIPE ignore if no SO_NOSIGPIPE
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#define SOCKET_T int
|
||||
#ifndef SO_NOSIGPIPE
|
||||
#include <signal.h> /* ignore SIGPIPE */
|
||||
#endif
|
||||
#endif /* USE_WINDOWS_API */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@@ -354,7 +357,9 @@ static INLINE void tcp_socket(SOCKET_T* sockfd, SOCKADDR_IN_T* addr,
|
||||
if (res < 0)
|
||||
err_sys("setsockopt SO_NOSIGPIPE failed\n");
|
||||
}
|
||||
#endif
|
||||
#else /* no S_NOSIGPIPE */
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif /* S_NOSIGPIPE */
|
||||
|
||||
#if defined(TCP_NODELAY)
|
||||
if (!udp)
|
||||
|
Reference in New Issue
Block a user