summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-08 22:28:58 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-08 22:28:58 +0200
commit2550dbacea260e0f918eb23a1fdf762c5104053c (patch)
treea6a0943cc0d7896a1629fc35e7c7eefae84f78b3
parentb2e5284c7420a6636f056cfdaf5646463bc9ce53 (diff)
downloadhittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.tar.gz
hittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.tar.xz
hittpd-2550dbacea260e0f918eb23a1fdf762c5104053c.zip
use AI_V4MAPPED only if available
-rw-r--r--hittpd.c5
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);