From: Neil Horman Date: Sat, 6 Apr 2024 22:28:57 +0000 (-0400) Subject: dont include unistd.h on windows for sslecho X-Git-Tag: openssl-3.4.0-alpha1~699 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad6e549fadde344cbbe9d7f4aafb4d3a2a67094;p=thirdparty%2Fopenssl.git dont include unistd.h on windows for sslecho Reviewed-by: Nicola Tuveri Reviewed-by: Tim Hudson Reviewed-by: Paul Dale Reviewed-by: Tom Cosgrove (Merged from https://github.com/openssl/openssl/pull/24047) --- diff --git a/demos/sslecho/main.c b/demos/sslecho/main.c index c75eac2bc37..4973902cf56 100644 --- a/demos/sslecho/main.c +++ b/demos/sslecho/main.c @@ -8,14 +8,19 @@ */ #include -#include #include -#include -#include -#include +#include #include #include #include +#if !defined(OPENSSL_SYS_WINDOWS) +#include +#include +#include +#include +#else +#include +#endif static const int server_port = 4433; @@ -153,8 +158,10 @@ int main(int argc, char **argv) struct sockaddr_in addr; unsigned int addr_len = sizeof(addr); +#if !defined (OPENSSL_SYS_WINDOWS) /* ignore SIGPIPE so that server can continue running when client pipe closes abruptly */ signal(SIGPIPE, SIG_IGN); +#endif /* Splash */ printf("\nsslecho : Simple Echo Client/Server : %s : %s\n\n", __DATE__,