Mercurial > hg > nnchat
changeset 365:88ac689d11bc
Win32/MinGW specific fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 23 Jun 2011 11:24:25 +0300 |
parents | f73354a738b3 |
children | 12b043d03417 |
files | libnnchat.c libnnchat.h |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libnnchat.c Thu Jun 23 11:14:06 2011 +0300 +++ b/libnnchat.c Thu Jun 23 11:24:25 2011 +0300 @@ -231,7 +231,11 @@ /* Wait for SOCKS server to reply */ for (status = tries = 1; tries <= 20 && status > 0; tries++) { - usleep(500); +#ifdef __WIN32 + Sleep(50); +#else + usleep(50000); +#endif nn_conn_reset(conn); status = nn_conn_pull(conn); }
--- a/libnnchat.h Thu Jun 23 11:14:06 2011 +0300 +++ b/libnnchat.h Thu Jun 23 11:24:25 2011 +0300 @@ -8,9 +8,12 @@ #include <stdio.h> #include <unistd.h> +#include "th_types.h" #ifdef __WIN32 #include <windows.h> #include <winsock.h> +typedef uint16_t in_port_t; +typedef uint32_t in_addr_t; #else #include <sys/select.h> #include <sys/socket.h>