From 0d2a8db626b9118837aabc2c970f2c5a11dd713f Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 22 Nov 2013 13:39:57 +0000 Subject: [PATCH] Added #define for WSAPoll --- build/src/internal.h | 4 +++- mongoose.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build/src/internal.h b/build/src/internal.h index 11d11765..9fc4ccbe 100644 --- a/build/src/internal.h +++ b/build/src/internal.h @@ -187,13 +187,15 @@ typedef struct DIR { struct dirent result; } DIR; -#ifndef HAVE_POLL struct pollfd { SOCKET fd; short events; short revents; }; #define POLLIN 1 + +#ifdef HAVE_POLL +#define poll(x, y, z) WSAPoll((x), (y), (z)) #endif diff --git a/mongoose.c b/mongoose.c index 93a7c75c..269c1e9e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -187,13 +187,15 @@ typedef struct DIR { struct dirent result; } DIR; -#ifndef HAVE_POLL struct pollfd { SOCKET fd; short events; short revents; }; #define POLLIN 1 + +#ifdef HAVE_POLL +#define poll(x, y, z) WSAPoll((x), (y), (z)) #endif