{"thread":{"id":"39254","subject":"[BUG] deamon.c does not compile when NO_IPV6 is used","startedAt":"2015-05-05T14:20:15Z","lastAt":"2015-05-18T22:29:40Z","messageCount":4,"participants":["Eduardo Espejo","Junio C Hamano","René Scharfe"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"260603","messageId":"CAK4aQQJ9yT8+Q9jPQ78cauhyPj3j5WmpgrQJ5=cA-ECjaWn8BQ@mail.gmail.com","threadId":"39254","inReplyTo":null,"subject":"[BUG] deamon.c does not compile when NO_IPV6 is used","fromName":"Eduardo Espejo","fromEmail":"eduardo.espejo@gmail.com","sentAt":"2015-05-05T14:20:15Z","receivedAt":"2015-05-05T14:20:15Z","isPatch":false,"sender":{"key":"eduardo.espejo@gmail.com","avatar":null},"body":"Tested in 2.4 commit 3d4a3ffe64:\n\ndaemon.c:636:24: error: use of undeclared identifier 'hostname'\n                hent = gethostbyname(hostname.buf);\n\n--\nEduardo Espejo\n"},{"id":"260605","messageId":"xmqqioc6ewnw.fsf@gitster.dls.corp.google.com","threadId":"39254","inReplyTo":"CAK4aQQJ9yT8+Q9jPQ78cauhyPj3j5WmpgrQJ5=cA-ECjaWn8BQ@mail.gmail.com","subject":"Re: [BUG] deamon.c does not compile when NO_IPV6 is used","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-05T17:55:47Z","receivedAt":"2015-05-05T17:55:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eduardo Espejo <eduardo.espejo@gmail.com> writes:\n\n> Tested in 2.4 commit 3d4a3ffe64:\n>\n> daemon.c:636:24: error: use of undeclared identifier 'hostname'\n>                 hent = gethostbyname(hostname.buf);\n\nThanks.  It seems nobody actively interested in developing Git\nbuilds with NO_IPV6 these days?\n\nDoes this help?\n\n daemon.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/daemon.c b/daemon.c\nindex ac2bc85..d3d3e43 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -633,7 +633,7 @@ static void lookup_hostname(struct hostinfo *hi)\n \t\tchar **ap;\n \t\tstatic char addrbuf[HOST_NAME_MAX + 1];\n \n-\t\thent = gethostbyname(hostname.buf);\n+\t\thent = gethostbyname(hi->hostname.buf);\n \t\tif (hent) {\n \t\t\tap = hent->h_addr_list;\n \t\t\tmemset(&sa, 0, sizeof sa);\n"},{"id":"260607","messageId":"xmqqd22eew4v.fsf_-_@gitster.dls.corp.google.com","threadId":"39254","inReplyTo":"xmqqioc6ewnw.fsf@gitster.dls.corp.google.com","subject":"[PATCH] daemon: unbreak NO_IPV6 build regression","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-05T18:07:12Z","receivedAt":"2015-05-05T18:07:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When 01cec54e (daemon: deglobalize hostname information, 2015-03-07)\nwrapped the global variables such as hostname inside a struct, it\nforgot to convert one location that spelled \"hostname\" that needs to\nbe updated to \"hi->hostname\".\n\nThis was inside NO_IPV6 block, and was not caught by anybody.\n\nReported by: Eduardo Espejo\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n daemon.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/daemon.c b/daemon.c\nindex 9ee2187..4be1091 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -633,7 +633,7 @@ static void lookup_hostname(struct hostinfo *hi)\n \t\tchar **ap;\n \t\tstatic char addrbuf[HOST_NAME_MAX + 1];\n \n-\t\thent = gethostbyname(hostname.buf);\n+\t\thent = gethostbyname(hi->hostname.buf);\n \t\tif (hent) {\n \t\t\tap = hent->h_addr_list;\n \t\t\tmemset(&sa, 0, sizeof sa);\n-- \n2.4.0-311-gf1d9b8d\n"},{"id":"261522","messageId":"555A67D4.9040204@web.de","threadId":"39254","inReplyTo":"xmqqd22eew4v.fsf_-_@gitster.dls.corp.google.com","subject":"Re: [PATCH] daemon: unbreak NO_IPV6 build regression","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2015-05-18T22:29:40Z","receivedAt":"2015-05-18T22:29:40Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 05.05.2015 um 20:07 schrieb Junio C Hamano:\n> When 01cec54e (daemon: deglobalize hostname information, 2015-03-07)\n> wrapped the global variables such as hostname inside a struct, it\n> forgot to convert one location that spelled \"hostname\" that needs to\n> be updated to \"hi->hostname\".\n>\n> This was inside NO_IPV6 block, and was not caught by anybody.\n\nSorry for that, and thank you for cleaning up after me. :-/\n\n@Eduardo: Out of interest, on which platform (CPU, operating system, \ncompiler) did you notice the bug?\n\nThanks,\nRené\n"}]}