# HG changeset patch # User Roy Marples # Date 1601478879 -3600 # Node ID df4ea0197ce89bc914cb8a8d94bd25e93793b9ce # Parent a3d5af47a4e32445fc583cab3870841cc2b13c29 BSD: Fix compile for non NetBSD diff -r a3d5af47a4e3 -r df4ea0197ce8 src/dhcpcd.c --- a/src/dhcpcd.c Tue Sep 29 08:00:24 2020 +0100 +++ b/src/dhcpcd.c Wed Sep 30 16:14:39 2020 +0100 @@ -765,7 +765,7 @@ /* BSD does not emit RTM_NEWADDR or RTM_CHGADDR when the * hardware address changes so we have to go * through the disovery process to work it out. */ - dhcpcd_handleinterface(ctx, 0, ifp->name); + dhcpcd_handleinterface(ifp->ctx, 0, ifp->name); #endif if (ifp->wireless) { uint8_t ossid[IF_SSIDLEN]; @@ -1017,14 +1017,13 @@ int dhcpcd_handleinterface(void *arg, int action, const char *ifname) { - struct dhcpcd_ctx *ctx; + struct dhcpcd_ctx *ctx = arg; struct ifaddrs *ifaddrs; struct if_head *ifs; struct interface *ifp, *iff; const char * const argv[] = { ifname }; int e; - ctx = arg; if (action == -1) { ifp = if_find(ctx->ifaces, ifname); if (ifp == NULL) {