From: Karsten Blees Date: Tue, 10 Sep 2013 23:22:34 +0000 (+0200) Subject: MSVC: fix compile errors due to macro redefinitions X-Git-Tag: v1.8.5-rc0~77^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61542f7735a71ec0e28744a79828a8cc93aea9c6;p=thirdparty%2Fgit.git MSVC: fix compile errors due to macro redefinitions Skip errno.h definitions if they are already defined. Signed-off-by: Karsten Blees Acked-by: Sebastian Schuberth Signed-off-by: Junio C Hamano --- 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;