From: Gustavo Zacarias Date: Thu, 14 Apr 2016 14:24:03 +0000 (-0300) Subject: connman: add patch to fix build with headers >= 4.5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0dece985;p=buildroot.git connman: add patch to fix build with headers >= 4.5 Add a patch from Gentoo that fixes the build on linux headers >= 4.5 The probem arises from an incompatibility in newer headers when both net/if.h and linux/if.h are included in the same source. See https://bugs.gentoo.org/show_bug.cgi?id=577584 Fixes: http://autobuild.buildroot.net/results/48e/48e6f34a7940f52d987db47784c0d9e82f39de7c/ Signed-off-by: Gustavo Zacarias Signed-off-by: Thomas Petazzoni --- diff --git a/package/connman/0003-xtables.patch b/package/connman/0003-xtables.patch new file mode 100644 index 0000000000..277fce6ed9 --- /dev/null +++ b/package/connman/0003-xtables.patch @@ -0,0 +1,61 @@ +Use some preprocessor tricks to route around incompatibilies seen +between newer Linux kernels and glibc when both net/if.h and linux/if.h +are included in the same source. + +Patch from gentoo, see https://bugs.gentoo.org/show_bug.cgi?id=577584 + +Signed-off-by: Gustavo Zacarias + +--- connman-1.31/src/iptables.c.old 2016-03-22 20:12:47.829460752 -0700 ++++ connman-1.31/src/iptables.c 2016-03-22 21:33:36.835384724 -0700 +@@ -28,11 +28,11 @@ + #include + #include + #include + #include + #include +-#include ++#include "connman_xtables.h" + #include + + #include + + #include "connman.h" +--- connman-1.31/src/firewall.c.old 2016-03-22 21:29:01.959472262 -0700 ++++ connman-1.31/src/firewall.c 2016-03-22 21:33:53.048144181 -0700 +@@ -23,11 +23,11 @@ + #include + #endif + + #include + +-#include ++#include "connman_xtables.h" + #include + + #include "connman.h" + + #define CHAIN_PREFIX "connman-" +--- /dev/null 2016-03-18 06:21:16.372989086 -0700 ++++ connman-1.31/include/connman_xtables.h 2016-03-22 21:32:21.349504786 -0700 +@@ -0,0 +1,20 @@ ++#ifndef CONNMAN_XTABLES_H ++#define CONNMAN_XTABLES_H ++ ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) ++#include ++#else ++#ifdef __USE_MISC ++#define GENTOO_USE_MISC __USE_MISC ++#undef __USE_MISC ++#endif ++ ++#include ++ ++#ifdef GENTOO_USE_MISC ++#define __USE_MISC GENTOO_USE_MISC ++#undef GENTOO_USE_MISC ++#endif ++#endif ++#endif