git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-compat-util.h:798:13: error: conflicting types for ‘inet_ntop’

From
Jeff King <peff@peff.net>
Date
Feb 3, 2020, 11:02 UTC
Message-ID
<20200203110249.GA4153124@coredump.intra.peff.net>
In-Reply-To
<CAH8yC8mmNXGw13zkrmxxJFQKEsmGqkKHFp13+U7==umHM2WR_Q@mail.gmail.com>
On Mon, Feb 03, 2020 at 05:46:53AM -0500, Jeffrey Walton wrote:
> Below is from configure.ac around line 720
> (https://github.com/git/git/blob/master/configure.ac#L722).
> 
> I think the test program needs to include <arpa/inet.h>.

I don't know very much about autoconf, but I'm not sure we need to worry about the header. Looking at the generated "configure" script, I think it puts in a dummy prototype, and just confirms that the linker is able to find it (the resulting test-program would obviously behave poorly, but we don't try to run it).

> Then, if the current -lresolv test fails, configure should use the
> same program and check -lsocket -lnls.

Yeah, that makes sense. Though there is a test above for -lsocket, and if it works, then we put "-lsocket" into $LIBS in the configure script. And I _think_ that means that subsequent tests would already be trying with -lsocket, and we might just need a similar test for -lnsl (but again, my autoconf is quite rusty).

You might get more information by looking at the output in config.log to see the actual compiler/linker output during the inet_ntop test, and why the link fails.

-Peff
Previous: Jeffrey Walton
Message 8 of 8 in “git-compat-util.h:798:13: error: conflicting types for ‘inet_ntop’”
  1. Jeffrey WaltonFeb 1, 2020
  2. Jeffrey WaltonFeb 1, 2020
  3. Jeffrey WaltonFeb 1, 2020
  4. Jeff KingFeb 3, 2020
  5. Jeffrey WaltonFeb 3, 2020
  6. Jeff KingFeb 3, 2020
  7. Jeffrey WaltonFeb 3, 2020
  8. Jeff KingFeb 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.