summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorKarsten Blees <karsten.blees@gmail.com>2013-09-11 01:22:34 +0200
committerJunio C Hamano <gitster@pobox.com>2013-09-11 11:08:52 -0700
commit61542f7735a71ec0e28744a79828a8cc93aea9c6 (patch)
tree96fbd09592a986521eba5b099daebe2ce2eef6b7 /compat
parentbad866a29b0ec560c9bed31e2fe3610b6cf50ae3 (diff)
downloadgit-61542f7735a71ec0e28744a79828a8cc93aea9c6.tar.gz
MSVC: fix compile errors due to macro redefinitions
Skip errno.h definitions if they are already defined. Signed-off-by: Karsten Blees <blees@dcon.de> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index bd0a88bc1d..6b531e4013 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -32,7 +32,9 @@ typedef int socklen_t;
#define WEXITSTATUS(x) ((x) & 0xff)
#define WTERMSIG(x) SIGTERM
+#ifndef EWOULDBLOCK
#define EWOULDBLOCK EAGAIN
+#endif
#define SHUT_WR SD_SEND
#define SIGHUP 1
@@ -46,8 +48,12 @@ typedef int socklen_t;
#define F_SETFD 2
#define FD_CLOEXEC 0x1
+#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
+#ifndef ECONNABORTED
#define ECONNABORTED WSAECONNABORTED
+#endif
struct passwd {
char *pw_name;