Ensure portability/Windows.h is included before OpenSSL headers
authorChristopher Dykes <cdykes@fb.com>
Tue, 24 Jan 2017 21:28:28 +0000 (13:28 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 24 Jan 2017 21:33:01 +0000 (13:33 -0800)
Summary: Because OpenSSL is evil to Windows, and you have to forcefully include winsock2 before winsock.

Reviewed By: yfeldblum

Differential Revision: D4453742

fbshipit-source-id: 3b1b5b1f999722559693164148245f52b1e94104

folly/portability/OpenSSL.h
folly/ssl/detail/SSLSessionImpl.h

index dc6dade71dff73e3702e3e2cb50fea9f34c46856..7990e137cbf106c4038829c7f5f4a7ae58f089f2 100644 (file)
@@ -16,6 +16,9 @@
 
 #pragma once
 
 
 #pragma once
 
+// This must come before the OpenSSL includes.
+#include <folly/portability/Windows.h>
+
 #include <openssl/ssl.h>
 #include <openssl/x509.h>
 
 #include <openssl/ssl.h>
 #include <openssl/x509.h>
 
index 6b4a9ea8bc9abe74ba5dd589783c0b882fb6169a..72fb82007c4fec0f79e83257d5aa6ab2a32d059b 100644 (file)
@@ -17,7 +17,9 @@
 #pragma once
 
 #include <folly/Range.h>
 #pragma once
 
 #include <folly/Range.h>
-#include <openssl/ssl.h>
+
+#include <folly/portability/OpenSSL.h>
+
 #include <string>
 
 namespace folly {
 #include <string>
 
 namespace folly {