WIN32: Make dup2 a NO-OP under win32.

There is something wrong with dup2 under win32 and I do not know win32
well enough to fix it, thus this workaround.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2017-06-14 08:20:42 -07:00
parent 64ffae4062
commit 446a0f5d2f
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -65,6 +65,7 @@ typedef int socklen_t;
#define writev win32_writev
#define strncasecmp _strnicmp
#define strdup _strdup
#define dup2(x, y, z) win32_dup2(x, y)
#define poll(x, y, z) win32_poll(x, y, z)
#define inet_pton(x,y,z) win32_inet_pton(x,y,z)
#define sleep(x) Sleep(x * 1000)