aboutsummaryrefslogtreecommitdiff
path: root/apps/lib/s_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/lib/s_socket.c')
-rw-r--r--apps/lib/s_socket.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/lib/s_socket.c b/apps/lib/s_socket.c
index 36dbe61..bddf160 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 <process.h>
+# define getpid _getpid
+#endif
+
#ifndef OPENSSL_NO_SOCK
# include "apps.h"