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)
This commit is contained in:
Tanzinul Islam 2021-07-31 18:28:34 +01:00 committed by Tanzinul Islam
parent 2625807aff
commit ab98861e91

View 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