Skip to content

Commit d34621a

Browse files
committed
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.
1 parent faf153b commit d34621a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

channels.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,19 @@
4242
#include "includes.h"
4343

4444
#ifdef WIN32_FIXME
45-
#define ECONNABORTED WSAECONNABORTED
46-
#define ECONNREFUSED WSAECONNREFUSED
45+
#ifdef ECONNABORTED
46+
#undef ECONNABORTED
47+
#endif
48+
#define ECONNABORTED WSAECONNABORTED
49+
#ifdef ECONNREFUSED
50+
#undef ECONNREFUSED
51+
#endif
52+
#define ECONNREFUSED WSAECONNREFUSED
53+
#ifdef EINPROGRESS
54+
#undef EINPROGRESS
55+
#endif
56+
#define EINPROGRESS WSAEINPROGRESS
57+
#define _CRT_NO_POSIX_ERROR_CODES
4758
#endif
4859

4960

0 commit comments

Comments
 (0)