From 2550dbacea260e0f918eb23a1fdf762c5104053c Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 8 May 2020 22:28:58 +0200 Subject: use AI_V4MAPPED only if available --- hittpd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit 1.4.1