From: Roy Marples Date: Thu, 24 Apr 2014 09:41:25 +0000 (+0000) Subject: Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO. X-Git-Tag: v6.4.0~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62247de8beb65c228ece7e0002b9fe2c0d31fe07;p=thirdparty%2Fdhcpcd.git Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO. --- diff --git a/dhcp6.c b/dhcp6.c index 9c5b2123..e2f47301 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -67,6 +67,11 @@ /* Unsure if I want this */ //#define VENDOR_SPLIT +/* Support older systems with different defines */ +#if !defined(IPV6_RECVPKTINFO) && defined(IPV6_PKTINFO) +#define IPV6_RECVPKTINFO IPV6_PKTINFO +#endif + struct dhcp6_op { uint16_t type; const char *name; diff --git a/ipv6nd.c b/ipv6nd.c index 5fbc0a55..615ad661 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -150,6 +150,14 @@ static void ipv6nd_handledata(void *arg); memset(filterp, 0xff, sizeof(struct icmp6_filter)); #endif +/* Support older systems with different defines */ +#if !defined(IPV6_RECVHOPLIMIT) && defined(IPV6_HOPLIMIT) +#define IPV6_RECVHOPLIMIT IPV6_HOPLIMIT +#endif +#if !defined(IPV6_RECVPKTINFO) && defined(IPV6_PKTINFO) +#define IPV6_RECVPKTINFO IPV6_PKTINFO +#endif + static int ipv6nd_open(struct dhcpcd_ctx *dctx) {