From 2022f210db7cd9195e4d39151168c1a684015991 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 28 Sep 2019 13:39:06 -0700 Subject: [PATCH] Use Winsock definition of EWOULDBLOCK rather than the POSIX one --- natpmp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/natpmp.c b/natpmp.c index fdf58df..c4b7bc3 100644 --- a/natpmp.c +++ b/natpmp.c @@ -39,12 +39,14 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include -#ifndef EWOULDBLOCK -#define EWOULDBLOCK WSAEWOULDBLOCK +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK #endif -#ifndef ECONNREFUSED -#define ECONNREFUSED WSAECONNREFUSED +#ifdef ECONNREFUSED +#undef ECONNREFUSED #endif +#define EWOULDBLOCK WSAEWOULDBLOCK +#define ECONNREFUSED WSAECONNREFUSED #include "wingettimeofday.h" #define gettimeofday natpmp_gettimeofday #else