Commit 6902ff20 authored by Max Kellermann's avatar Max Kellermann

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.
parent ac0af919
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment