summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2017-06-01 15:44:23 +0300
committerRoman Arutyunyan <arut@nginx.com>2017-06-01 15:44:23 +0300
commit3259595970a1281119a53e07e50f9cbb0d6c66aa (patch)
tree59ae09eb41e5ed23a1e2b7f3bc0ae7862ec4dd0a
parent62a95ace42a24c94f3470c7f77854c84b12bb856 (diff)
downloadnginx-3259595970a1281119a53e07e50f9cbb0d6c66aa.tar.gz
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).
-rw-r--r--auto/unix5
1 files changed, 4 insertions, 1 deletions
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 <sys/socket.h>
#include <netinet/in.h>"
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