All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: johan defries <johandefries@gmail.com>
Cc: git@vger.kernel.org, gitter.spiros@gmail.com
Subject: Re: compile error in Git v2.7.0-rc0
Date: Mon, 14 Dec 2015 12:35:25 -0800	[thread overview]
Message-ID: <xmqqvb80ix9u.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CALibRqFajuBuv9ooaBWL1kUzaVps2WfodqucyHni2ggv6JpwDg@mail.gmail.com> (johan defries's message of "Mon, 14 Dec 2015 21:28:52 +0100")

johan defries <johandefries@gmail.com> 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);

  reply	other threads:[~2015-12-14 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 20:28 compile error in Git v2.7.0-rc0 johan defries
2015-12-14 20:35 ` Junio C Hamano [this message]
2015-12-14 20:46   ` Jeff King
2015-12-14 20:52     ` Jeff King
2015-12-14 21:11       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvb80ix9u.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitter.spiros@gmail.com \
    --cc=johandefries@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.