changeset 2437:6a132edb5389 draft

Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO.
author Roy Marples <roy@marples.name>
date Thu, 24 Apr 2014 09:41:25 +0000
parents 39ad227cc122
children f58aadd5d2b3
files dhcp6.c ipv6nd.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dhcp6.c	Thu Apr 24 09:28:31 2014 +0000
+++ b/dhcp6.c	Thu Apr 24 09:41:25 2014 +0000
@@ -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;
--- a/ipv6nd.c	Thu Apr 24 09:28:31 2014 +0000
+++ b/ipv6nd.c	Thu Apr 24 09:41:25 2014 +0000
@@ -150,6 +150,14 @@
 	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)
 {