Re: daemon.c fails to build on Darwin

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

 



merlyn@xxxxxxxxxxxxxx (Randal L. Schwartz) writes:

> 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.

Sorry about that.  Johannes sent a fix which I'll apply.

From: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
Subject: [PATCH/RFC] daemon: default to 256 for HOST_NAME_MAX if it is not defined
Date: Thu, 28 Sep 2006 12:00:35 +0200 (CEST)
Message-ID: <Pine.LNX.4.63.0609281200200.14200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
---
	... or should we make it wider available, by putting it into
	cache.h?

 daemon.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/daemon.c b/daemon.c
index 5335d21..fc3951c 100644
--- a/daemon.c
+++ b/daemon.c
@@ -15,6 +15,10 @@ #include "cache.h"
 #include "exec_cmd.h"
 #include "interpolate.h"
 
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256
+#endif
+
 static int log_syslog;
 static int verbose;
 static int reuseaddr;
-- 
1.4.2.1.g430572-dirty


-
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]