* [BUG] deamon.c does not compile when NO_IPV6 is used
@ 2015-05-05 14:20 Eduardo Espejo
2015-05-05 17:55 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Espejo @ 2015-05-05 14:20 UTC (permalink / raw)
To: git
Tested in 2.4 commit 3d4a3ffe64:
daemon.c:636:24: error: use of undeclared identifier 'hostname'
hent = gethostbyname(hostname.buf);
--
Eduardo Espejo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] deamon.c does not compile when NO_IPV6 is used
2015-05-05 14:20 [BUG] deamon.c does not compile when NO_IPV6 is used Eduardo Espejo
@ 2015-05-05 17:55 ` Junio C Hamano
2015-05-05 18:07 ` [PATCH] daemon: unbreak NO_IPV6 build regression Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2015-05-05 17:55 UTC (permalink / raw)
To: Eduardo Espejo; +Cc: git
Eduardo Espejo <eduardo.espejo@gmail.com> writes:
> 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(-)
diff --git a/daemon.c b/daemon.c
index ac2bc85..d3d3e43 100644
--- 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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] daemon: unbreak NO_IPV6 build regression
2015-05-05 17:55 ` Junio C Hamano
@ 2015-05-05 18:07 ` Junio C Hamano
2015-05-18 22:29 ` René Scharfe
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2015-05-05 18:07 UTC (permalink / raw)
To: git; +Cc: Eduardo Espejo, René Scharfe
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
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon.c b/daemon.c
index 9ee2187..4be1091 100644
--- 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);
--
2.4.0-311-gf1d9b8d
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] daemon: unbreak NO_IPV6 build regression
2015-05-05 18:07 ` [PATCH] daemon: unbreak NO_IPV6 build regression Junio C Hamano
@ 2015-05-18 22:29 ` René Scharfe
0 siblings, 0 replies; 4+ messages in thread
From: René Scharfe @ 2015-05-18 22:29 UTC (permalink / raw)
To: Junio C Hamano, git; +Cc: Eduardo Espejo
Am 05.05.2015 um 20:07 schrieb Junio C Hamano:
> 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.
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é
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-18 22:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 14:20 [BUG] deamon.c does not compile when NO_IPV6 is used Eduardo Espejo
2015-05-05 17:55 ` Junio C Hamano
2015-05-05 18:07 ` [PATCH] daemon: unbreak NO_IPV6 build regression Junio C Hamano
2015-05-18 22:29 ` René Scharfe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).