From: Roy Marples Date: Tue, 19 Feb 2019 22:07:08 +0000 (+0000) Subject: Guard with IP_PKTINFO as well. X-Git-Tag: v7.2.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c72e4ef7c19126fe539485a8bfb56a5d12b7b896;p=thirdparty%2Fdhcpcd.git Guard with IP_PKTINFO as well. --- diff --git a/src/if.c b/src/if.c index 9ba286d1..95067c77 100644 --- a/src/if.c +++ b/src/if.c @@ -807,7 +807,7 @@ if_findifpfromcmsg(struct dhcpcd_ctx *ctx, struct msghdr *msg, int *hoplimit) struct cmsghdr *cm; unsigned int ifindex = 0; struct interface *ifp; -#ifdef INET +#if defined(INET) && defined(IP_PKTINFO) struct in_pktinfo ipi; #endif #ifdef INET6 @@ -820,7 +820,7 @@ if_findifpfromcmsg(struct dhcpcd_ctx *ctx, struct msghdr *msg, int *hoplimit) cm; cm = (struct cmsghdr *)CMSG_NXTHDR(msg, cm)) { -#ifdef INET +#if defined(INET) && defined(IP_PKTINFO) if (cm->cmsg_level == IPPROTO_IP) { switch(cm->cmsg_type) { case IP_PKTINFO: