diff options
author | mrcsys | 2006-05-01 17:51:50 +0000 |
---|---|---|
committer | mrcsys | 2006-05-01 17:51:50 +0000 |
commit | c41f3517d50ae8f6c203ababd347bf2105d17b18 (patch) | |
tree | 8e84bc95d2fccafa4347edded9b33306aee7e1ad /nanohttp/nanohttp-socket.c | |
parent | 417555bf235d2ca473530b9c69c2a77c7cfdc444 (diff) | |
download | csoap-c41f3517d50ae8f6c203ababd347bf2105d17b18.tar.gz csoap-c41f3517d50ae8f6c203ababd347bf2105d17b18.tar.bz2 |
Some fixes because recent changes did not work in WIN32. Now should be compat
Diffstat (limited to 'nanohttp/nanohttp-socket.c')
-rw-r--r-- | nanohttp/nanohttp-socket.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-socket.c b/nanohttp/nanohttp-socket.c index 84ee578..7ce9a25 100644 --- a/nanohttp/nanohttp-socket.c +++ b/nanohttp/nanohttp-socket.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-socket.c,v 1.59 2006/04/26 17:48:29 mrcsys Exp $ +* $Id: nanohttp-socket.c,v 1.60 2006/05/01 17:51:50 mrcsys Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -70,6 +70,8 @@ #include <winsock2.h> #include <process.h> +#define inline + #ifndef __MINGW32__ typedef int ssize_t; #endif @@ -253,7 +255,7 @@ hsocket_bind(hsocket_t * dsock, int port) static herror_t _hsocket_sys_accept(hsocket_t * sock, hsocket_t * dest) { - socklen_t asize; + int asize; hsocket_t sockfd; asize = sizeof(struct sockaddr_in); @@ -452,7 +454,11 @@ hsocket_select_read(int sock, char *buf, size_t len) log_verbose2("Socket %d timeout", sock); return -1; } +#ifdef WIN32 + return recv(sock, buf, len, 0); +#else return read(sock, buf, len); +#endif } herror_t |