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

Re: daemon.c fails to build on Darwin

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 28, 2006, 16:06 UTC
Message-ID
<20060928160652.GC2947@spearce.org>
In-Reply-To
<86ejtw3sbv.fsf@blue.stonehenge.com>
"Randal L. Schwartz" <merlyn@stonehenge.com> wrote:
Show 13 quoted lines
> 
> If this is obvious, can someone fix it?  If not, I'll try to sort it out later
> tonight.
> 
>     gcc -o daemon.o -c -g -O2 -Wall -I/sw/include -I/opt/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRLCPY daemon.c
>     daemon.c: In function 'fill_in_extra_table_entries':
>     daemon.c:460: error: 'HOST_NAME_MAX' undeclared (first use in this function)
>     daemon.c:460: error: (Each undeclared identifier is reported only once
>     daemon.c:460: error: for each function it appears in.)
>     daemon.c:460: warning: unused variable 'addrbuf'
>     make: *** [daemon.o] Error 1
> 
> This is with 2d5b459107cf07bbb307cfb196c2007c497a6dd2.
According to pickaxe it was dd4676299dde0a4c6f8a471e6353170f86a78c8a.

Looks like HOST_NAME_MAX isn't defined on Darwin. Looking at how daemon.c is using it this just needs to be defined to a suitable length if its not already defined. Sort of like PATH_MAX on some other systems...

-- 
Shawn.
Previous: Alex RiesenNext: Junio C Hamano
Message 3 of 4 in “daemon.c fails to build on Darwin”
  1. Randal L. SchwartzSep 28, 2006
  2. Alex RiesenSep 28, 2006
  3. Shawn PearceSep 28, 2006
  4. Junio C HamanoSep 28, 2006

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.