aboutsummaryrefslogtreecommitdiffstats
path: root/util/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/http.c')
-rw-r--r--util/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/http.c b/util/http.c
index 02b558f5f..de5aba946 100644
--- a/util/http.c
+++ b/util/http.c
@@ -787,8 +787,9 @@ write_server( int sock, const char *data, size_t length )
while( nleft > 0 ) {
#ifdef __MINGW32__
unsigned long nwritten;
+ HANDLE sock_fd = (HANDLE)sock;
- if ( !WriteFile ( sock, data, nleft, &nwritten, NULL)) {
+ if ( !WriteFile ( sock_fd, data, nleft, &nwritten, NULL)) {
log_info ("write failed: ec=%d\n", (int)GetLastError ());
return G10ERR_NETWORK;
}