diff --git a/src/event.c b/src/event.c index cfe5952..05b05f6 100644 --- a/src/event.c +++ b/src/event.c @@ -18,9 +18,10 @@ #ifndef _WIN32 #include +#include #else #include -#define ETIMEOUT WSAETIMEDOUT +#define ETIMEDOUT WSAETIMEDOUT #define ECONNRESET WSAECONNRESET #define ECONNABORTED WSAECONNABORTED #endif @@ -129,7 +130,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout) conn->connect_timeout) FD_SET(conn->sock, &wfds); else { - conn->error = ETIMEOUT; + conn->error = ETIMEDOUT; xmpp_info(ctx, "xmpp", "Connection attempt timed out."); conn_disconnect(conn); }