Merge pull request #2930 from akikoskinen/maint/v0.22 Fix build on mingw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/src/common.h b/src/common.h
index a8f60fe..d798548 100644
--- a/src/common.h
+++ b/src/common.h
@@ -33,6 +33,7 @@
# include <direct.h>
# include <winsock2.h>
# include <windows.h>
+# include <ws2tcpip.h>
# include "win32/msvc-compat.h"
# include "win32/mingw-compat.h"
# include "win32/error.h"
diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index 3a6369d..108ccfe 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -7,10 +7,6 @@
#ifdef GIT_SSL
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <openssl/x509v3.h>
-
#include <ctype.h>
#include "global.h"
@@ -20,6 +16,10 @@
#include "netops.h"
#include "git2/transport.h"
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/x509v3.h>
+
static int ssl_set_error(SSL *ssl, int error)
{
int err;