From: Richard Levitte Date: Fri, 11 Jun 2021 02:55:03 +0000 (+0200) Subject: apps/lib/s_socket.c: Alias getpid with _getpid for _WIN32 X-Git-Tag: openssl-3.0.0-beta1~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=814b5133e9aca90f1edb99c38a26e55cd7e50e19;p=thirdparty%2Fopenssl.git apps/lib/s_socket.c: Alias getpid with _getpid for _WIN32 Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15710) --- diff --git a/apps/lib/s_socket.c b/apps/lib/s_socket.c index 36dbe615d2f..bddf16045ff 100644 --- a/apps/lib/s_socket.c +++ b/apps/lib/s_socket.c @@ -26,6 +26,15 @@ typedef unsigned int u_int; #endif +#ifdef _WIN32 +/* + * With MSVC, certain POSIX functions have been renamed to have an underscore + * prefix. + */ +# include +# define getpid _getpid +#endif + #ifndef OPENSSL_NO_SOCK # include "apps.h"