Skip to content

Commit

Permalink
MSVC: fix compile errors due to macro redefinitions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Karsten Blees authored and Junio C Hamano committed Sep 11, 2013
1 parent bad866a commit 61542f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compat/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 61542f7

Please sign in to comment.