# HG changeset patch
# User Roman Arutyunyan <arut@nginx.com>
# Date 1496144789 -10800
#      Tue May 30 14:46:29 2017 +0300
# Node ID ca23bd7cfaefb2f011a72faf83d5b00b574f8e3e
# Parent  5e05118678af7f013b95598eee1695285c62744f
Configure: disable IP_PKTINFO feature on certain platforms.

On Cygwin and NetBSD struct in_pktinfo has no field ipi_spec_dst.  This made
nginx compilation fail.  Now presence of this field is checked while configuring
nginx.

diff --git a/auto/unix b/auto/unix
--- 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
 
 
