]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Redefine getpid() -> _getpid() only for MSVC
authorTanzinul Islam <tanzinul.islam@gmail.com>
Sat, 31 Jul 2021 17:28:34 +0000 (18:28 +0100)
committerTanzinul Islam <t_17_7@hotmail.com>
Sat, 31 Jul 2021 19:26:37 +0000 (20:26 +0100)
This was introduced in 814b5133e for MSVC. C++Builder doesn't need it.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16192)

apps/lib/s_socket.c

index 6884fd86cdc4deb6e404180d4a5847226262188c..dbeebb54c5b7233edf5e058bb0329decf50495aa 100644 (file)
@@ -27,12 +27,12 @@ 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
+
+/* MSVC renamed some POSIX functions to have an underscore prefix. */
+# ifdef _MSC_VER
+#  define getpid _getpid
+# endif
 #endif
 
 #ifndef OPENSSL_NO_SOCK