]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/lib/s_socket.c: Alias getpid with _getpid for _WIN32
authorRichard Levitte <levitte@openssl.org>
Fri, 11 Jun 2021 02:55:03 +0000 (04:55 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 11 Jun 2021 07:48:54 +0000 (09:48 +0200)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15710)

apps/lib/s_socket.c

index 36dbe615d2f80ba15411c3da03d9f9626fcb2ae3..bddf16045ff6606782277068a83ce59f8718d90c 100644 (file)
 typedef unsigned int u_int;
 #endif
 
+#ifdef _WIN32
+/*
+ * With MSVC, certain POSIX functions have been renamed to have an underscore
+ * prefix.
+ */
+# include <process.h>
+# define getpid _getpid
+#endif
+
 #ifndef OPENSSL_NO_SOCK
 
 # include "apps.h"