From 3259595970a1281119a53e07e50f9cbb0d6c66aa Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 1 Jun 2017 15:44:23 +0300 Subject: [PATCH] Configure: disabled IP_PKTINFO feature on certain platforms. On Cygwin and NetBSD 7.0+ struct in_pktinfo has no ipi_spec_dst field, which caused nginx compilation error. Now presence of this field is ensured by the IP_PKTINFO feature test. The problem was introduced by dbb0c854e308 (1.13.0). --- auto/unix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auto/unix b/auto/unix index 7c6a8550d..10835f6cc 100644 --- a/auto/unix +++ b/auto/unix @@ -428,7 +428,10 @@ ngx_feature_incs="#include #include " ngx_feature_path= ngx_feature_libs= -ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_PKTINFO, NULL, 0)" +ngx_feature_test="struct in_pktinfo pkt; + pkt.ipi_spec_dst.s_addr = INADDR_ANY; + (void) pkt; + setsockopt(0, IPPROTO_IP, IP_PKTINFO, NULL, 0)" . auto/feature