Re: compile error in Git v2.7.0-rc0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



johan defries <johandefries@xxxxxxxxx> writes:

> Probably because I have NO_IPV6 defined.
>
> ident.c: In function ‘canonical_name’:
> ident.c:89:37: error: ‘buf’ undeclared (first use in this function)
>   struct hostent *he = gethostbyname(buf);
>                                      ^
> ident.c:89:37: note: each undeclared identifier is reported only once
> for each function it appears in
> make: *** [ident.o] Fout 1

Thanks.  This should perhaps do?

 ident.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ident.c b/ident.c
index 4e7f99d..2900879 100644
--- a/ident.c
+++ b/ident.c
@@ -86,6 +86,7 @@ static int canonical_name(const char *host, struct strbuf *out)
 		freeaddrinfo(ai);
 	}
 #else
+	char buf[1024];
 	struct hostent *he = gethostbyname(buf);
 	if (he && strchr(he->h_name, '.')) {
 		strbuf_addstr(out, he->h_name);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]