diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-14 22:32:20 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-14 22:32:20 -0400 |
commit | a14a93e1fa7a3e3b34febd23b6eb3e97c4cca868 (patch) | |
tree | 3663b887c99f1e45d3a1b2499d00395c703ab514 /src | |
parent | e05a9354a3a9656f37e65b07d440cc7a78ea65af (diff) | |
download | lighttpd-git-a14a93e1fa7a3e3b34febd23b6eb3e97c4cca868.tar.gz |
[core] check getaddrinfo EAI_ADDRFAMILY w/ glibc
check getaddrinfo() error EAI_ADDRFAMILY only with __GLIBC__ defined
x-ref:
"www/lighttpd: fix listening on IPv6 and IPv4 addresses"
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271335
Diffstat (limited to 'src')
-rw-r--r-- | src/sock_addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sock_addr.c b/src/sock_addr.c index 3874b85e..5c9750eb 100644 --- a/src/sock_addr.c +++ b/src/sock_addr.c @@ -496,7 +496,7 @@ int sock_addr_from_str_hints(sock_addr * const restrict saddr, socklen_t * const if (0 != (rc = getaddrinfo(str, NULL, &hints, &res))) { hints.ai_family = AF_INET; if ( - #ifdef EAI_ADDRFAMILY + #if defined(__GLIBC__) && defined(EAI_ADDRFAMILY) EAI_ADDRFAMILY == rc && #endif 0 == getaddrinfo(str, NULL, &hints, &res)) { |