summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorPaul Serice <paul@serice.net>2005-11-22 07:54:23 -0600
committerJunio C Hamano <junkio@cox.net>2005-11-22 12:38:27 -0800
commitc61642185d411e5e3350566a68483e358ca392b9 (patch)
treec183291c9f13912f9111ee0ab2e24ac47f3147ed /connect.c
parentd1ab157759f0738a13bfb04bca8c436814913d4b (diff)
downloadgit-c61642185d411e5e3350566a68483e358ca392b9.tar.gz
Fixed git:// IPv4 address problem when compiled with -DNO_IPV6.
Failure to dereference a pointer caused incorrect initialization of the IPv4 address when calling connect() when compiled with -DNO_IPV6. With this patch and yesterday's patch for git-daemon, it should now be possible to use the native git protocol for both the client and server on Cygwin. Signed-off-by: Paul Serice <paul@serice.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index 7a417e5a73..93f6f80d3e 100644
--- a/connect.c
+++ b/connect.c
@@ -427,7 +427,7 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
memset(&sa, 0, sizeof sa);
sa.sin_family = he->h_addrtype;
sa.sin_port = htons(nport);
- memcpy(&sa.sin_addr, ap, he->h_length);
+ memcpy(&sa.sin_addr, *ap, he->h_length);
if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
close(sockfd);