Merge branch 'jc/daemon-no-ipv6-for-2.4.1' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2015 20:49:19 +0000 (13:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2015 20:49:19 +0000 (13:49 -0700)
"git daemon" fails to build from the source under NO_IPV6
configuration (regression in 2.4).

* jc/daemon-no-ipv6-for-2.4.1:
daemon: unbreak NO_IPV6 build regression

daemon.c
index 9ee21877cd952a7aa47c793d877174d858488794..4be10914e63bda68272c25e52cb199346cf9ec3c 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -633,7 +633,7 @@ static void lookup_hostname(struct hostinfo *hi)
                char **ap;
                static char addrbuf[HOST_NAME_MAX + 1];
 
-               hent = gethostbyname(hostname.buf);
+               hent = gethostbyname(hi->hostname.buf);
                if (hent) {
                        ap = hent->h_addr_list;
                        memset(&sa, 0, sizeof sa);