From 6902ff20846dcb98596d9d04c19e752e830645c5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 2 Dec 2008 10:23:36 +0100 Subject: listen: check if AI_ADDRCONFIG is defined AI_ADDRCONFIG is not available on all operating systems. Check if it is defined in the current build environment. --- src/listen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/listen.c') diff --git a/src/listen.c b/src/listen.c index 0e2dd6611..0e3467364 100644 --- a/src/listen.c +++ b/src/listen.c @@ -190,7 +190,10 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param) DEBUG("binding to address for %s\n", param->value); memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + hints.ai_flags = AI_PASSIVE; +#ifdef AI_ADDRCONFIG + hints.ai_flags |= AI_ADDRCONFIG; +#endif hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; -- cgit v1.2.3