diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-05-08 22:28:58 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-05-08 22:28:58 +0200 |
commit | 2550dbacea260e0f918eb23a1fdf762c5104053c (patch) | |
tree | a6a0943cc0d7896a1629fc35e7c7eefae84f78b3 | |
parent | b2e5284c7420a6636f056cfdaf5646463bc9ce53 (diff) | |
download | hittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.tar.gz hittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.tar.xz hittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.zip |
use AI_V4MAPPED only if available
-rw-r--r-- | hittpd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hittpd.c b/hittpd.c index ab94b30..d8d71be 100644 --- a/hittpd.c +++ b/hittpd.c @@ -904,7 +904,10 @@ main(int argc, char *argv[]) struct addrinfo hints = { .ai_family = AF_INET6, .ai_socktype = SOCK_STREAM, - .ai_flags = AI_PASSIVE | AI_V4MAPPED, + .ai_flags = AI_PASSIVE +#ifdef AI_V4MAPPED + | AI_V4MAPPED +#endif }, *res; r = getaddrinfo(host, port, &hints, &res); |