From dbaad11d6dac92b6db98a3c37b483b250fff0b63 Mon Sep 17 00:00:00 2001
From: Justin Waters <justin.waters@timesys.com>
Date: Thu, 18 Jul 2013 09:57:26 -0400
Subject: [PATCH] ipv6.c: Define flag missing from older kernels

This is a hack, pure and simple. However, on kernels that do not
support the feature, it should never execute those code branches
triggered on it.

The other solution would be to force the system to use newer kernel
headers, but this accomplishes the same thing on a much smaller scale.
---
 ipv6.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: dhcpcd-6.1.0/ipv6.c
===================================================================
--- dhcpcd-6.1.0.orig/ipv6.c	2013-09-20 06:27:24.000000000 -0400
+++ dhcpcd-6.1.0/ipv6.c	2013-10-28 14:13:10.914811205 -0400
@@ -35,6 +35,12 @@
 #ifdef __linux__
 #  include <asm/types.h> /* for systems with broken headers */
 #  include <linux/rtnetlink.h>
+
+/* Hack for older kernels. It should never trigger these branches */
+#ifndef IFA_F_DADFAILED
+#define IFA_F_DADFAILED            0x08
+#endif
+
    /* Match Linux defines to BSD */
 #  define IN6_IFF_TENTATIVE	(IFA_F_TENTATIVE | IFA_F_OPTIMISTIC)
 #  define IN6_IFF_DUPLICATED	IFA_F_DADFAILED
