summary refs log tree commit diff
diff options
context:
space:
mode:
-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);