[nginx] Configure: disabled IP_PKTINFO feature on certain platforms.

Roman Arutyunyan arut at nginx.com
Thu Jun 1 14:05:18 UTC 2017


details:   http://hg.nginx.org/nginx/rev/716852cce913
branches:  
changeset: 7020:716852cce913
user:      Roman Arutyunyan <arut at nginx.com>
date:      Thu Jun 01 15:44:23 2017 +0300
description:
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).

diffstat:

 auto/unix |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 8ce1a34f160b -r 716852cce913 auto/unix
--- a/auto/unix	Thu Jun 01 16:49:14 2017 +0300
+++ b/auto/unix	Thu Jun 01 15:44:23 2017 +0300
@@ -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
 
 


More information about the nginx-devel mailing list