#68947 closed defect (fixed)

c-ares @1.24.0 broken on <10.9: undeclared IFF_UP, IFF_LOOPBACK

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger, leopard, snowleopard, lion, mountainlion Cc:
Port: c-ares

Description

https://github.com/c-ares/c-ares/issues/672

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_c-ares/c-ares/work/c-ares-1.24.0/src/lib/ares__iface_ips.c: In function 'ares__iface_ips_enumerate':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_c-ares/c-ares/work/c-ares-1.24.0/src/lib/ares__iface_ips.c:460:28: error: 'IFF_UP' undeclared (first use in this function)
  460 |     if (!(ifa->ifa_flags & IFF_UP)) {
      |                            ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_c-ares/c-ares/work/c-ares-1.24.0/src/lib/ares__iface_ips.c:460:28: note: each undeclared identifier is reported only once for each function it appears in
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_c-ares/c-ares/work/c-ares-1.24.0/src/lib/ares__iface_ips.c:464:26: error: 'IFF_LOOPBACK' undeclared (first use in this function); did you mean 'IN_LOOPBACKNET'?
  464 |     if (ifa->ifa_flags & IFF_LOOPBACK) {
      |                          ^~~~~~~~~~~~
      |                          IN_LOOPBACKNET
make[2]: *** [src/lib/CMakeFiles/c-ares.dir/ares__iface_ips.c.o] Error 1

Change History (3)

comment:1 Changed 11 months ago by barracuda156

Fix from upstream: https://github.com/bradh352/c-ares/commit/b48cb72

Confirmed to work.

comment:2 Changed 11 months ago by kencu (Ken)

this fix is in legacysupport too, so we usually just use that rather than pester upstreams

comment:3 Changed 11 months ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In 282326ec8a4ef34c639f6cf8b8ab71f1f52a0fc0/macports-ports (master):

c-ares: backport fix from upstream to unbreak build on <10.9

Backport of https://github.com/c-ares/c-ares/commit/7e63ac00cfa110d8d4ef18128a14c26e0adc10de
Fixes: #68947

Note: See TracTickets for help on using tickets.