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
JWJeffrey Walton <noloader@gmail.com>
Date
Feb 3, 2020, 10:46 UTC
Message-ID
<CAH8yC8mmNXGw13zkrmxxJFQKEsmGqkKHFp13+U7==umHM2WR_Q@mail.gmail.com>
In-Reply-To
<20200203085405.GC2164@coredump.intra.peff.net>
...
Show 5 quoted lines
> But having those variables unset is already the default. The root of the
> problem is likely that the autoconf test seems to get the wrong result
> on Solaris (another workaround would be to remove them from
> config.mak.autogen, but that will get obliterated next time you run
> ./configure).
Thanks Jeff.

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>. Then, if the current -lresolv test fails, configure should use the same program and check -lsocket -lnls.

How would you like to craft the test? Or how should I craft the test?

# The next few tests will define NEEDS_RESOLV if linking with # libresolv provides some of the functions we would normally get # from libc. NEEDS_RESOLV= # # Define NO_INET_NTOP if linking with -lresolv is not enough. # Solaris 2.7 in particular hos inet_ntop in -lresolv. NO_INET_NTOP= AC_CHECK_FUNC([inet_ntop], [], [AC_CHECK_LIB([resolv], [inet_ntop], [NEEDS_RESOLV=YesPlease], [NO_INET_NTOP=YesPlease]) ]) GIT_CONF_SUBST([NO_INET_NTOP])

Previous: Jeff KingNext: Jeff King
Message 7 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.