Skip to content

Commit

Permalink
Define NI_MAXSERV if not defined by operating system
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick Welche authored and Shawn O. Pearce committed Oct 19, 2007
1 parent fd0b959 commit 415e7b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 415e7b8

Please sign in to comment.