Opened 6 years ago
Closed 6 years ago
#1284 closed defect (fixed)
Build failure if defined IP_PKTINFO but missing ipi_spec_dst in struct in_pktinfo
|Reported by:||OBATA Akio||Owned by:|
|uname -a:||NetBSD 7.1 i386|
In ngx_sendmsg() of src/os/unix/ngx_udp_sendmsg_chain.c,
if IP_PKTINFO is available for setsockopt (NGX_HAVE_PKTINFO),
in_pktinfo.ipi_spec_dst is used unconditionally.
But it is missing for NetBSD-7.1, so I cannot build nginx-1.13.0.
Change History (6)
comment:1 by , 6 years ago
by , 6 years ago
comment:2 by , 6 years ago
Yes, it resolve the build failure, but NGX_HAVE_IP_PKTINFO is also used in other places without using in_pktinfo.ipi_spec_dst.
From manual of NetBSD ip(4) and Windows Sockets 2 (used on Cygwin), ipi_addr member of
in_pktinfo is usable for both source and destnation depending on its usage.
comment:3 by , 6 years ago
As for NetBSD, the manual seems to be wrong.
IP_PKTINFO is in fact only supported for recvmsg().
comment:4 by , 6 years ago
The patch was committed:
comment:5 by , 6 years ago
|Status:||new → closed|
Thanks for reporting this.
Please try the attached patch.