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