diff options
author | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-10-15 16:05:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-16 05:14:39 +0200 |
commit | 13d24b018f348401cceca45da5c0dd6d17411268 (patch) | |
tree | 9569fe30551a57e7b69a29128b37a3da4bf95725 /compat/mingw.h | |
parent | mergetools: use the correct tool for Beyond Compare 3 on Windows (diff) | |
download | git-13d24b018f348401cceca45da5c0dd6d17411268.tar.xz git-13d24b018f348401cceca45da5c0dd6d17411268.zip |
mingw: ensure sockets are initialized before calling gethostname
If the Windows sockets subsystem has not been initialized yet then an
attempt to get the hostname returns an error and prints a warning to the
console. This solves this issue for msysGit as seen with 'git fetch'.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | compat/mingw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index ce9dd980eb..fecf0d0776 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 |