deamon.c does not compile when NO_IPV6 is used
Tested in 2.4 commit 3d4a3ffe64:
daemon.c:636:24: error: use of undeclared identifier 'hostname'
hent = gethostbyname(hostname.buf);
--
Eduardo Espejo
Quoted 4 lines · Eduardo Espejo
Tested in 2.4 commit
3d4a3ffe64:daemon.c:636:24: error: use of undeclared identifier 'hostname'
hent = gethostbyname(hostname.buf);
Thanks. It seems nobody actively interested in developing Git builds with NO_IPV6 these days?
Does this help?
daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
daemon.c +1 -1
@@ -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);
PATCH 1/1 daemon: unbreak NO_IPV6 build regression
When 01cec54e (daemon: deglobalize hostname information, 2015-03-07) wrapped the global variables such as hostname inside a struct, it forgot to convert one location that spelled "hostname" that needs to be updated to "hi->hostname".
This was inside NO_IPV6 block, and was not caught by anybody.
Reported by: Eduardo Espejo
--- daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
daemon.c +1 -1
@@ -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);
Signature · 1 line
2.4.0-311-gf1d9b8d
Re: [PATCH] daemon: unbreak NO_IPV6 build regression
Am 05.05.2015 um 20:07 schrieb Junio C Hamano:
Quoted 6 lines
When
01cec54e(daemon: deglobalize hostname information, 2015-03-07) wrapped the global variables such as hostname inside a struct, it forgot to convert one location that spelled "hostname" that needs to be updated to "hi->hostname".This was inside
NO_IPV6block, and was not caught by anybody.
Sorry for that, and thank you for cleaning up after me. :-/
@Eduardo: Out of interest, on which platform (CPU, operating system, compiler) did you notice the bug?
Thanks,
René