[MacPorts] #61314: unbound @1.12.0: error: use of undeclared identifier 'IF_NAMESIZE'
MacPorts
noreply at macports.org
Tue Oct 13 22:18:46 UTC 2020
#61314: unbound @1.12.0: error: use of undeclared identifier 'IF_NAMESIZE'
--------------------------+----------------------
Reporter: chrstphrchvz | Owner: nerdling
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Keywords: | Port: unbound
--------------------------+----------------------
Build fails on
[https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/27548/steps
/install-port/logs/stdio 10.8] and earlier:
{{{
services/listen_dnsport.c:1411:40: error: use of undeclared identifier
'IF_NAMESIZE'
char addr_buf[INET6_ADDRSTRLEN + 1 + IF_NAMESIZE + 1 + 16
+ 1];
^
services/listen_dnsport.c:1447:23: error: use of undeclared identifier
'IF_NAMESIZE'
char if_index_name[IF_NAMESIZE + 1];
^
services/listen_dnsport.c:1453:4: warning: implicit declaration of
function 'if_indextoname' is invalid in C99 [-Wimplicit-function-
declaration]
if_indextoname(in6->sin6_scope_id,
^
1 warning and 2 errors generated.
}}}
This is because during configuration net/if.h (which defines
`IF_NAMESIZE`) isn't detected, so `HAVE_NET_IF_H` isn't defined and
net/if.h won't be included by source files:
{{{
checking for net/if.h... no
}}}
Without digging into the configuration check, I'm inclined to think this
is similar to #55238 where sys/socket.h needs to be included when using
net/if.h on 10.8 and earlier; a future release of legacysupport will
include sys/socket.h automatically ([ea4b467559/macports-legacy-support]).
--
Ticket URL: <https://trac.macports.org/ticket/61314>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list