1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

cygwin compatibility

Signed-off-by: Bob Roberts <bobroberts177@gmail.com>
This commit is contained in:
Bob Roberts 2013-04-25 09:16:30 +08:00 committed by Andy Green
parent d34bae15d3
commit ac04911dde
3 changed files with 4 additions and 4 deletions

View file

@ -358,7 +358,7 @@ static void
strtolower(char *s)
{
while (*s) {
*s = tolower(*s);
*s = tolower((int)*s);
s++;
}
}

View file

@ -452,7 +452,7 @@ libwebsockets_get_peer_addresses(struct libwebsocket_context *context,
struct libwebsocket *wsi, int fd, char *name, int name_len,
char *rip, int rip_len)
{
unsigned int len;
socklen_t len;
struct sockaddr_in sin;
struct hostent *host;
struct hostent *host1;
@ -554,7 +554,7 @@ int lws_set_socket_options(struct libwebsocket_context *context, int fd)
(const void *)&optval, optlen) < 0)
return 1;
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__CYGWIN__)
/*
* didn't find a way to set these per-socket, need to

View file

@ -126,7 +126,7 @@ int lws_server_socket_service(struct libwebsocket_context *context,
{
struct libwebsocket *new_wsi;
int accept_fd;
unsigned int clilen;
socklen_t clilen;
struct sockaddr_in cli_addr;
int n;
ssize_t len;