path: root/compat
diff options
authorJunio C Hamano <>2011-10-19 04:59:11 (GMT)
committerJunio C Hamano <>2011-10-19 04:59:11 (GMT)
commit578183bcb0fd30b7a36b98b714de96220793e712 (patch)
treefe34ca7c397d1ad49000624b7e5c59ccfa46a6ad /compat
parent54633cd53bf22672aed900a2a9df5d4f92548091 (diff)
parentf64943d242d3b0fff40684d09033f17bb9747a38 (diff)
Merge branch 'pt/mingw-misc-fixes'
* pt/mingw-misc-fixes: t9901: fix line-ending dependency on windows mingw: ensure sockets are initialized before calling gethostname mergetools: use the correct tool for Beyond Compare 3 on Windows t9300: do not run --cat-blob-fd related tests on MinGW git-svn: On MSYS, escape and quote SVN_SSH also if set by the user t9001: do not fail only due to CR/LF issues t1020: disable the pwd test on MinGW
Diffstat (limited to 'compat')
2 files changed, 10 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 8947418..efdc703 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1321,6 +1321,13 @@ static void ensure_socket_initialization(void)
initialized = 1;
+#undef gethostname
+int mingw_gethostname(char *name, int namelen)
+ ensure_socket_initialization();
+ return gethostname(name, namelen);
#undef gethostbyname
struct hostent *mingw_gethostbyname(const char *host)
diff --git a/compat/mingw.h b/compat/mingw.h
index ce9dd98..fecf0d0 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -190,6 +190,9 @@ char *mingw_getcwd(char *pointer, int len);
char *mingw_getenv(const char *name);
#define getenv mingw_getenv
+int mingw_gethostname(char *host, int namelen);
+#define gethostname mingw_gethostname
struct hostent *mingw_gethostbyname(const char *host);
#define gethostbyname mingw_gethostbyname