summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTanzinul Islam <tanzinul.islam@gmail.com>2021-07-31 18:28:34 +0100
committerTanzinul Islam <t_17_7@hotmail.com>2021-07-31 20:26:37 +0100
commitab98861e919b8f8f7fee3f2d44ef3b4b05908a25 (patch)
tree610ea140c7b9b01fe6f7cf641b48cd4535c95796 /apps
parent2625807aff370830b55c0fb71b63357e8523733e (diff)
Redefine getpid() -> _getpid() only for MSVC
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)
Diffstat (limited to 'apps')
-rw-r--r--apps/lib/s_socket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/lib/s_socket.c b/apps/lib/s_socket.c
index 6884fd86cd..dbeebb54c5 100644
--- a/apps/lib/s_socket.c
+++ b/apps/lib/s_socket.c
@@ -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