]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO.
authorRoy Marples <roy@marples.name>
Thu, 24 Apr 2014 09:41:25 +0000 (09:41 +0000)
committerRoy Marples <roy@marples.name>
Thu, 24 Apr 2014 09:41:25 +0000 (09:41 +0000)
dhcp6.c
ipv6nd.c

diff --git a/dhcp6.c b/dhcp6.c
index 9c5b2123cbc17c32f020b48b58df6067404d6f6b..e2f47301e2719471171c99b065faa800cc5537c3 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
 /* 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;
index 5fbc0a556884a7b538c56343b0af0534d4d21240..615ad6612f06d0ed8647e589c8c1a386a9bd5779 100644 (file)
--- 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)
 {