Ticket #1284: pktinfo

File pktinfo, 950 bytes (added by Roman Arutyunyan, 9 years ago)
Line 
1# HG changeset patch
2# User Roman Arutyunyan <arut@nginx.com>
3# Date 1496144789 -10800
4# Tue May 30 14:46:29 2017 +0300
5# Node ID ca23bd7cfaefb2f011a72faf83d5b00b574f8e3e
6# Parent 5e05118678af7f013b95598eee1695285c62744f
7Configure: disable IP_PKTINFO feature on certain platforms.
8
9On Cygwin and NetBSD struct in_pktinfo has no field ipi_spec_dst. This made
10nginx compilation fail. Now presence of this field is checked while configuring
11nginx.
12
13diff --git a/auto/unix b/auto/unix
14--- a/auto/unix
15+++ b/auto/unix
16@@ -428,7 +428,10 @@ ngx_feature_incs="#include <sys/socket.h
17 #include <netinet/in.h>"
18 ngx_feature_path=
19 ngx_feature_libs=
20-ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_PKTINFO, NULL, 0)"
21+ngx_feature_test="struct in_pktinfo pkt;
22+ pkt.ipi_spec_dst.s_addr = INADDR_ANY;
23+ (void) pkt;
24+ setsockopt(0, IPPROTO_IP, IP_PKTINFO, NULL, 0)"
25 . auto/feature
26
27