From 4acb291d71f84cdd3b4115e8a4ef72109792f3fc Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 19 Oct 2018 14:54:55 +0800 Subject: [PATCH] dhcpcd: Apply local modifications * The modification to 'src/if.c' makes it can be build with '-Werror=implicit-fallthrough', which is enabled with '-Wextra'. However, both swildner and I still don't understand why such a modification is needed :( * In 'src/ipv6.c', explicitly suppress the '#warning' on IPV6_POLLADDRFLAG, an IPv6 feature that dfly currently doesn't support. --- contrib/dhcpcd/src/if-bsd.c | 2 ++ contrib/dhcpcd/src/if.c | 1 + contrib/dhcpcd/src/ipv6.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/contrib/dhcpcd/src/if-bsd.c b/contrib/dhcpcd/src/if-bsd.c index cdd959a6a4..2339e39c63 100644 --- a/contrib/dhcpcd/src/if-bsd.c +++ b/contrib/dhcpcd/src/if-bsd.c @@ -50,6 +50,8 @@ #include #ifdef __NetBSD__ #include /* Needs netinet/if_ether.h */ +#elif defined(__DragonFly__) +#include #else #include #endif diff --git a/contrib/dhcpcd/src/if.c b/contrib/dhcpcd/src/if.c index 1835620638..4a571e3b93 100644 --- a/contrib/dhcpcd/src/if.c +++ b/contrib/dhcpcd/src/if.c @@ -479,6 +479,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, /* FALLTHROUGH */ #endif #ifdef IFT_L2VLAN + /* FALLTHROUGH */ case IFT_L2VLAN: /* FALLTHROUGH */ #endif #ifdef IFT_L3IPVLAN diff --git a/contrib/dhcpcd/src/ipv6.c b/contrib/dhcpcd/src/ipv6.c index 49de68607a..672e4d249f 100644 --- a/contrib/dhcpcd/src/ipv6.c +++ b/contrib/dhcpcd/src/ipv6.c @@ -83,10 +83,12 @@ # define SHA256_DIGEST_LENGTH 32 #endif +#if 0 /* XXX: suppress the warning as dfly currently doesn't support it */ #ifdef IPV6_POLLADDRFLAG # warning kernel does not report IPv6 address flag changes # warning polling tentative address flags periodically #endif +#endif /* Hackery at it's finest. */ #ifndef s6_addr32 -- 2.41.0