mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 06:59:10 +08:00
22 lines
692 B
Diff
22 lines
692 B
Diff
|
diff --git a/include/openssl/e_ostime.h b/include/openssl/e_ostime.h
|
||
|
index 8a7cc9880fa79..0e17487504992 100644
|
||
|
--- a/include/openssl/e_ostime.h
|
||
|
+++ b/include/openssl/e_ostime.h
|
||
|
@@ -22,7 +22,15 @@
|
||
|
*/
|
||
|
|
||
|
# if defined(OPENSSL_SYS_WINDOWS)
|
||
|
-# include <winsock2.h>
|
||
|
+# if !defined(_WINSOCKAPI_)
|
||
|
+ /*
|
||
|
+ * winsock2.h defines _WINSOCK2API_ and both winsock2.h and winsock.h define
|
||
|
+ * _WINSOCKAPI_. Both of these provide struct timeval. Don't include
|
||
|
+ * winsock2.h if either header has been included to avoid breakage with
|
||
|
+ * applications that prefer to use <winsock.h> over <winsock2.h>.
|
||
|
+ */
|
||
|
+# include <winsock2.h>
|
||
|
+# endif
|
||
|
# else
|
||
|
# include <sys/time.h>
|
||
|
# endif
|