Opened 7 years ago
Closed 7 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: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | other | Version: | |
Keywords: | Cc: | ||
uname -a: | NetBSD 7.1 i386 | ||
nginx -V: | 1.13.0 |
Description
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.
Attachments (1)
Change History (6)
comment:1 by , 7 years ago
by , 7 years ago
comment:2 by , 7 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 , 7 years ago
As for NetBSD, the manual seems to be wrong.
IP_PKTINFO is in fact only supported for recvmsg().
comment:5 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Thanks for reporting this.
Please try the attached patch.