Skip to content

Commit 61542f7

Browse files
kbleesgitster
authored andcommitted
MSVC: fix compile errors due to macro redefinitions
Skip errno.h definitions if they are already defined. Signed-off-by: Karsten Blees <[email protected]> Acked-by: Sebastian Schuberth <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bad866a commit 61542f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compat/mingw.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ typedef int socklen_t;
3232
#define WEXITSTATUS(x) ((x) & 0xff)
3333
#define WTERMSIG(x) SIGTERM
3434

35+
#ifndef EWOULDBLOCK
3536
#define EWOULDBLOCK EAGAIN
37+
#endif
3638
#define SHUT_WR SD_SEND
3739

3840
#define SIGHUP 1
@@ -46,8 +48,12 @@ typedef int socklen_t;
4648
#define F_SETFD 2
4749
#define FD_CLOEXEC 0x1
4850

51+
#ifndef EAFNOSUPPORT
4952
#define EAFNOSUPPORT WSAEAFNOSUPPORT
53+
#endif
54+
#ifndef ECONNABORTED
5055
#define ECONNABORTED WSAECONNABORTED
56+
#endif
5157

5258
struct passwd {
5359
char *pw_name;

0 commit comments

Comments
 (0)