diff options
| author | Roy Marples <roy@marples.name> | 2016-05-18 19:41:19 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-05-18 19:41:19 +0000 |
| commit | 2117dd8d4a9245795086259be80b9e3615dae012 (patch) | |
| tree | f4d433809c6263b854f5a302838f8ed7ae3419fd /if-bsd.c | |
| parent | a5c054c9d5f81b6918c37c0b49cf5af548c26921 (diff) | |
| download | dhcpcd-2117dd8d4a9245795086259be80b9e3615dae012.tar.xz | |
Fix compile
Diffstat (limited to 'if-bsd.c')
| -rw-r--r-- | if-bsd.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -531,13 +531,13 @@ next: int -if_address(unsigned char cmd, struct ipv4_addr *ia) +if_address(unsigned char cmd, const struct ipv4_addr *ia) { int r; struct in_aliasreq ifra; memset(&ifra, 0, sizeof(ifra)); - strlcpy(ifra.ifra_name, ifp->name, sizeof(ifra.ifra_name)); + strlcpy(ifra.ifra_name, ia->iface->name, sizeof(ifra.ifra_name)); #define ADDADDR(var, addr) do { \ (var)->sin_family = AF_INET; \ @@ -550,7 +550,7 @@ if_address(unsigned char cmd, struct ipv4_addr *ia) ADDADDR(&ifra.ifra_broadaddr, &ia->brd); #undef ADDADDR - r = ioctl(ifp->ctx->pf_inet_fd, + r = ioctl(ia->iface->ctx->pf_inet_fd, cmd == RTM_DELADDR ? SIOCDIFADDR : SIOCAIFADDR, &ifra); return r; } @@ -823,10 +823,11 @@ if_addrflags(const struct in_addr *addr, const struct interface *ifp) return -1; return ifr.ifr_addrflags; #else - UNUSED(ia); + UNUSED(addr); + UNUSED(ifp); + return 0; #endif } -#endif #endif /* INET */ #ifdef INET6 |
