From: David Lebrun Date: Fri, 16 Jun 2017 13:54:28 +0000 (+0200) Subject: iproute: fix compilation issue with older glibc X-Git-Tag: v4.12.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4319590f70b0b9ed2beebafaacb323ecf781e50;p=thirdparty%2Fiproute2.git iproute: fix compilation issue with older glibc If a header that includes linux/in6.h is included before iproute's utils.h, then iproute2 fails to compile on older glibc versions. Fixes: e8493916a8ede9970732e33ea52d30b83071f401 ("iproute: add support for SR-IPv6 lwtunnel encapsulation") Reported-by: Daniel Borkmann Signed-off-by: David Lebrun --- diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c index 1395f0332..5c0c7d110 100644 --- a/ip/iproute_lwtunnel.c +++ b/ip/iproute_lwtunnel.c @@ -19,13 +19,6 @@ #include #include #include - -#ifndef __USE_KERNEL_IPV6_DEFS -#define __USE_KERNEL_IPV6_DEFS -#endif -#include -#include -#include #include #include "rt_names.h" @@ -33,6 +26,10 @@ #include "iproute_lwtunnel.h" #include "bpf_util.h" +#include +#include +#include + static const char *format_encap_type(int type) { switch (type) {