From 7887c17096a69344bbeb723ce3a63aa48a34ef09 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 14 Feb 2021 14:41:15 +0100 Subject: [PATCH] Fix Mac OS X build. --- src/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2e13f89..61f90b6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,9 +15,10 @@ parse.c: parse.peg if which leg >/dev/null 2>&1; then leg -o $@ $^; else touch $@; fi # _POSIX_C_SOURCE is for SA_RESTART and others +# _DARWIN_C_SOURCE is for NI_MAXHOST on OS X # _XOPEN_SOURCE is for struct sigaction # _GNU_SOURCE is for h_errno and gethostbyname-related macros -___rinetd_CFLAGS = -std=c99 \ - -D_XOPEN_SOURCE -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L \ +___rinetd_CFLAGS = -std=c99 -D_POSIX_C_SOURCE=200809L \ + -D_XOPEN_SOURCE -D_GNU_SOURCE -D_DARWIN_C_SOURCE \ -Wall -Wextra -Wwrite-strings