Blame SOURCES/0019-include-Fix-musl-libc-compatibility.patch

05e71a
From fa5642bfc0585bfadef238b830058e4d6e07f4a4 Mon Sep 17 00:00:00 2001
05e71a
From: Baruch Siach <baruch@tkos.co.il>
05e71a
Date: Fri, 4 May 2018 12:46:52 +0300
05e71a
Subject: [PATCH] include: Fix musl libc compatibility
05e71a
MIME-Version: 1.0
05e71a
Content-Type: text/plain; charset=UTF-8
05e71a
Content-Transfer-Encoding: 8bit
05e71a
05e71a
Conflicting definitions of struct ethhdr between the kernel and musl
05e71a
libc provides headers causes a build failure:
05e71a
05e71a
In file included from .../usr/include/netinet/ether.h:8:0,
05e71a
                 from useful_functions.c:28:
05e71a
.../usr/include/netinet/if_ether.h:107:8: error: redefinition of ‘struct ethhdr’
05e71a
 struct ethhdr {
05e71a
        ^~~~~~
05e71a
In file included from include/linux/netfilter_bridge.h:8:0,
05e71a
                 from include/linux/netfilter_bridge/ebtables.h:17,
05e71a
                 from include/ebtables_u.h:27,
05e71a
                 from useful_functions.c:25:
05e71a
include/linux/if_ether.h:119:8: note: originally defined here
05e71a
 struct ethhdr {
05e71a
        ^~~~~~
05e71a
05e71a
Recent enough versions kernel headers allow the libc to suppress
05e71a
conflicting kernel definitions. Include the libc proivded
05e71a
netinet/ether.h before kernel headers to suppress the conflicting
05e71a
definition of struct ethhdr.
05e71a
05e71a
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
05e71a
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
05e71a
Signed-off-by: Phil Sutter <psutter@redhat.com>
05e71a
---
05e71a
 include/ebtables_u.h | 1 +
05e71a
 1 file changed, 1 insertion(+)
05e71a
05e71a
diff --git a/include/ebtables_u.h b/include/ebtables_u.h
05e71a
index c8589969bd8e0..4824a145964ef 100644
05e71a
--- a/include/ebtables_u.h
05e71a
+++ b/include/ebtables_u.h
05e71a
@@ -24,6 +24,7 @@
05e71a
 #ifndef EBTABLES_U_H
05e71a
 #define EBTABLES_U_H
05e71a
 #include <netinet/in.h>
05e71a
+#include <netinet/ether.h>
05e71a
 #include <linux/netfilter_bridge/ebtables.h>
05e71a
 #include <linux/netfilter/x_tables.h>
05e71a
 
05e71a
-- 
05e71a
2.21.0
05e71a