Define NI_MAXSERV if not defined by operating system
authorPatrick Welche <prlw1@newn.cam.ac.uk>
Thu, 18 Oct 2007 17:17:39 +0000 (18:17 +0100)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 19 Oct 2007 01:04:44 +0000 (21:04 -0400)
I found I needed NI_MAXSERV as it is defined in netdb.h, which is
not included by daemon.c.  Rather than including the whole header
we can define a reasonable fallback value.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
daemon.c

index 9cf22fef417cee29e550a35fef1bac1050482afa..660e1552d46b8566f162677af02d91dc351c5c3f 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -9,6 +9,10 @@
 #define HOST_NAME_MAX 256
 #endif
 
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
 static int log_syslog;
 static int verbose;
 static int reuseaddr;