Commit a944c6cc40273b45922fa22949fe6b12ff668889

Aki Koskinen 2015-03-02T11:08:04

Don't include headers on windows that aren't available This mainly concerns mingw build.

diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index 2a17a3a..e0cf9b6 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -12,9 +12,6 @@
 #include <openssl/x509v3.h>
 
 #include <ctype.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
 
 #include "global.h"
 #include "posix.h"
@@ -23,6 +20,12 @@
 #include "netops.h"
 #include "git2/transport.h"
 
+#ifndef GIT_WIN32
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+#endif
+
 static int ssl_set_error(SSL *ssl, int error)
 {
 	int err;