summaryrefslogtreecommitdiff
path: root/src/netops.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-09-30 17:21:30 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-10-01 00:41:08 +0200
commitccc9872d4df7ca6cd44f777c0600c4b1fab0f9e6 (patch)
tree9deaa2ef455a51142bc2f0e831c8e718932cdcd6 /src/netops.h
parenta95aeb489f32fa7e570ecad12fc236f0a0e237a3 (diff)
downloadlibgit2-ccc9872d4df7ca6cd44f777c0600c4b1fab0f9e6.tar.gz
Initialise the winsock DLL
Windows wants us to initialise the networking DLL before we're allowed to send data through a socket. Call WSASetup and WSACleanup if GIT_WIN32 is defined. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/netops.h')
-rw-r--r--src/netops.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netops.h b/src/netops.h
index 0d962ef61..b0425ae76 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -10,7 +10,7 @@
#ifndef GIT_WIN32
typedef int GIT_SOCKET;
#else
-typedef unsigned int GIT_SOCKET;
+typedef SOCKET GIT_SOCKET;
#endif
typedef struct gitno_buffer {
@@ -26,7 +26,7 @@ void gitno_consume(gitno_buffer *buf, const char *ptr);
void gitno_consume_n(gitno_buffer *buf, size_t cons);
int gitno_connect(const char *host, const char *port);
-int gitno_send(int s, const char *msg, size_t len, int flags);
+int gitno_send(GIT_SOCKET s, const char *msg, size_t len, int flags);
int gitno_select_in(gitno_buffer *buf, long int sec, long int usec);
int gitno_extract_host_and_port(char **host, char **port, const char *url, const char *default_port);