summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-07-06 16:58:06 -0700
committerVicent Martí <tanoku@gmail.com>2011-07-06 16:58:06 -0700
commitdbede305bfb434cdb90b6f7850ab9791bd94d739 (patch)
tree9623d28b0449793c3e6da339e29363eee5e81144 /src
parent1af935a39a635a3828749b5feb46348eb6a3d352 (diff)
parent39cdf2728052a0817c12ec4348eef2c5d0825661 (diff)
downloadlibgit2-dbede305bfb434cdb90b6f7850ab9791bd94d739.tar.gz
Merge pull request #306 from carlosmn/development
Fix network MSYS compilation
Diffstat (limited to 'src')
-rw-r--r--src/netops.c3
-rw-r--r--src/transport_git.c10
2 files changed, 2 insertions, 11 deletions
diff --git a/src/netops.c b/src/netops.c
index 613226d46..55cb7e45e 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -23,11 +23,12 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _MSC_VER
+#ifndef _WIN32
# include <sys/types.h>
# include <sys/socket.h>
# include <netdb.h>
#else
+# define _WIN32_WINNT 0x0501
# include <winsock2.h>
# include <Ws2tcpip.h>
# pragma comment(lib, "Ws2_32.lib")
diff --git a/src/transport_git.c b/src/transport_git.c
index d79ab5e34..b3e940731 100644
--- a/src/transport_git.c
+++ b/src/transport_git.c
@@ -23,16 +23,6 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _MSC_VER
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <netdb.h>
-#else
-# include <winsock2.h>
-# include <Ws2tcpip.h>
-# pragma comment(lib, "Ws2_32.lib")
-#endif
-
#include "git2/net.h"
#include "git2/pkt.h"
#include "git2/common.h"