diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-03 10:08:51 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-03 10:08:51 -0500 |
commit | 20273e4d3cf2554fb6d209474400105ca15e92b5 (patch) | |
tree | 0105296dd3a4427b62ef4ebde9f9be60611c953a | |
parent | 018fdbb5809469c917eb04c01e929050df30846f (diff) | |
parent | 45df2237bfe4bcb9df1c2f68b0d47ef0e4f3f78d (diff) | |
download | libgit2-20273e4d3cf2554fb6d209474400105ca15e92b5.tar.gz |
Merge pull request #2934 from akikoskinen/mingw_build_fix
Fix build on mingw (master branch)
-rw-r--r-- | src/common.h | 1 | ||||
-rw-r--r-- | src/openssl_stream.c | 17 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/common.h b/src/common.h index 98109ae3a..cdfc13657 100644 --- a/src/common.h +++ b/src/common.h @@ -38,6 +38,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 2a17a3abf..9ddf6e4be 100644 --- a/src/openssl_stream.c +++ b/src/openssl_stream.c @@ -7,14 +7,7 @@ #ifdef GIT_SSL -#include <openssl/ssl.h> -#include <openssl/err.h> -#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 +16,16 @@ #include "netops.h" #include "git2/transport.h" +#ifndef GIT_WIN32 +# include <sys/types.h> +# include <sys/socket.h> +# include <netinet/in.h> +#endif + +#include <openssl/ssl.h> +#include <openssl/err.h> +#include <openssl/x509v3.h> + static int ssl_set_error(SSL *ssl, int error) { int err; |