From d34621a289e7daa4bd6b094b03239065a3674441 Mon Sep 17 00:00:00 2001 From: dkulwin Date: Tue, 10 Nov 2015 15:51:24 -0600 Subject: [PATCH] Force defines for certain errno values. The visual studio errno.h file is conflicting with no-machine errno constants. Force the constants we need and define _CRT_NO_POSIX_ERROR_CODES to avoid redefining them. This fixes port forwarding for visual studio implementation. --- channels.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/channels.c b/channels.c index b2556e3..408dee7 100644 --- a/channels.c +++ b/channels.c @@ -42,8 +42,19 @@ #include "includes.h" #ifdef WIN32_FIXME - #define ECONNABORTED WSAECONNABORTED - #define ECONNREFUSED WSAECONNREFUSED +#ifdef ECONNABORTED +#undef ECONNABORTED +#endif +#define ECONNABORTED WSAECONNABORTED +#ifdef ECONNREFUSED +#undef ECONNREFUSED +#endif +#define ECONNREFUSED WSAECONNREFUSED +#ifdef EINPROGRESS +#undef EINPROGRESS +#endif +#define EINPROGRESS WSAEINPROGRESS +#define _CRT_NO_POSIX_ERROR_CODES #endif