diff options
author | Max Kellermann <max@duempel.org> | 2008-12-02 10:23:36 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-02 10:23:36 +0100 |
commit | 6902ff20846dcb98596d9d04c19e752e830645c5 (patch) | |
tree | 4dbb47a8ef5fd3a0344280137bb5cd10142cd5e0 | |
parent | ac0af919129ea36e14d3b7c3f14d86a73c2a7fa6 (diff) | |
download | mpd-6902ff20846dcb98596d9d04c19e752e830645c5.tar.gz mpd-6902ff20846dcb98596d9d04c19e752e830645c5.tar.xz mpd-6902ff20846dcb98596d9d04c19e752e830645c5.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/listen.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |