mirror of
https://github.com/git/git.git
synced 2026-01-19 15:09:01 +00:00
fixup! mingw: remove obsolete IPv6-related code
We still need to ensure that sockets are initialized when calling `getaddrinfo()`, otherwise git:// URLs cannot be accessed. This fixes https://github.com/git-for-windows/git/issues/1949. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -2143,6 +2143,14 @@ struct hostent *mingw_gethostbyname(const char *host)
|
||||
return gethostbyname(host);
|
||||
}
|
||||
|
||||
#undef getaddrinfo
|
||||
int mingw_getaddrinfo(const char *node, const char *service,
|
||||
const struct addrinfo *hints, struct addrinfo **res)
|
||||
{
|
||||
ensure_socket_initialization();
|
||||
return getaddrinfo(node, service, hints, res);
|
||||
}
|
||||
|
||||
int mingw_socket(int domain, int type, int protocol)
|
||||
{
|
||||
int sockfd;
|
||||
|
||||
@@ -297,6 +297,10 @@ int mingw_gethostname(char *host, int namelen);
|
||||
struct hostent *mingw_gethostbyname(const char *host);
|
||||
#define gethostbyname mingw_gethostbyname
|
||||
|
||||
int mingw_getaddrinfo(const char *node, const char *service,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
#define getaddrinfo mingw_getaddrinfo
|
||||
|
||||
int mingw_socket(int domain, int type, int protocol);
|
||||
#define socket mingw_socket
|
||||
|
||||
|
||||
Reference in New Issue
Block a user