summaryrefslogtreecommitdiff
path: root/src/netops.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-09-29 16:30:38 +0200
committerVicent Marti <tanoku@gmail.com>2011-09-29 16:30:38 +0200
commit6e34111e136f2881dc98696314e4ea6b246e393d (patch)
treed62a4891c0010bf476227026a4e060de3a128c68 /src/netops.c
parent356f11feeaadb19b6c5acf4e49fa6a17dc7b7a71 (diff)
downloadlibgit2-6e34111e136f2881dc98696314e4ea6b246e393d.tar.gz
netops: Use pragmas only in MSVC
Diffstat (limited to 'src/netops.c')
-rw-r--r--src/netops.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/netops.c b/src/netops.c
index 187397ec6..54aaa4677 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -4,19 +4,21 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-
#ifndef _WIN32
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <sys/select.h>
-# include <netdb.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <sys/select.h>
+# include <netdb.h>
#else
-# define _WIN32_WINNT 0x0501
-# include <winsock2.h>
-# include <Ws2tcpip.h>
-# pragma comment(lib, "Ws2_32.lib")
+# define _WIN32_WINNT 0x0501
+# include <winsock2.h>
+# include <Ws2tcpip.h>
+# ifdef _MSC_VER
+# pragma comment(lib, "Ws2_32.lib")
+# endif
#endif
+
#include "git2/errors.h"
#include "common.h"