diff options
| author | Roy Marples <roy@marples.name> | 2020-05-27 15:49:40 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-27 15:49:40 +0000 |
| commit | a9882c1a32b800fda466c3c4af3819281bb98e00 (patch) | |
| tree | ae4cf43490a9d05e006345887a8440d28e3f189d /src/if.c | |
| parent | 6f04fa4d8e9635606c348b28cf84fefdf31c6810 (diff) | |
| download | dhcpcd-a9882c1a32b800fda466c3c4af3819281bb98e00.tar.xz | |
Check AF_PACKET is defined
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -381,7 +381,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, struct if_laddrreq iflr = { .flags = IFLR_PREFIX }; int link_fd; #endif -#elif AF_PACKET +#elif defined(AF_PACKET) const struct sockaddr_ll *sll; #endif #if defined(SIOCGIFPRIORITY) @@ -423,7 +423,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, #ifdef AF_LINK if (ifa->ifa_addr->sa_family != AF_LINK) continue; -#elif AF_PACKET +#elif defined(AF_PACKET) if (ifa->ifa_addr->sa_family != AF_PACKET) continue; #endif @@ -578,7 +578,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, } ifp->hwlen = sdl->sdl_alen; memcpy(ifp->hwaddr, CLLADDR(sdl), ifp->hwlen); -#elif AF_PACKET +#elif defined(AF_PACKET) sll = (const void *)ifa->ifa_addr; ifp->index = (unsigned int)sll->sll_ifindex; ifp->hwtype = sll->sll_hatype; |
