From 269d7c27a1681ab8344f08943d66ed3297f5da65 Mon Sep 17 00:00:00 2001 From: Heiko Thiery Date: Sat, 6 Jun 2020 20:38:18 +0200 Subject: [PATCH] package/ethtool: add patch to fix build failures Add a patch from the kernel netdev mailing list [1] that solves autobuilder failures. Fixes: http://autobuild.buildroot.net/results/394e846bb48a0cc8564ebc3e8d1179ccd1f1560d/ [1] https://patchwork.ozlabs.org/project/netdev/patch/bb60cbfe99071fca4b0ea9e62d67a2341d8dd652.1590707335.git.mkubecek@suse.cz/ Signed-off-by: Heiko Thiery Signed-off-by: Thomas Petazzoni --- .../0001-netlink-fix-build-warnings.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/ethtool/0001-netlink-fix-build-warnings.patch diff --git a/package/ethtool/0001-netlink-fix-build-warnings.patch b/package/ethtool/0001-netlink-fix-build-warnings.patch new file mode 100644 index 0000000000..4e9b520d58 --- /dev/null +++ b/package/ethtool/0001-netlink-fix-build-warnings.patch @@ -0,0 +1,52 @@ +From 93b2d0ef0c2be825e56d1f810fbbfba4800fa831 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek +Date: Fri, 29 May 2020 01:21:12 +0200 +Subject: [PATCH] netlink: fix build warnings + +Depending on compiler version and options, some of these warnings may +result in build failure. + +- gcc 4.8 wants __KERNEL_DIV_ROUND_UP defined before including ethtool.h +- avoid pointer arithmetic on void * + +Signed-off-by: Michal Kubecek + +[Patch was taken from the linux netdev mailinglist and will be applied in the +upcoming ethtool release 5.8] +Signed-off-by: Heiko Thiery +--- + netlink/desc-ethtool.c | 2 +- + netlink/parser.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c +index 76c6f13..423479d 100644 +--- a/netlink/desc-ethtool.c ++++ b/netlink/desc-ethtool.c +@@ -4,9 +4,9 @@ + * Descriptions of ethtool netlink messages and attributes for pretty print. + */ + ++#include "../internal.h" + #include + +-#include "../internal.h" + #include "prettymsg.h" + + static const struct pretty_nla_desc __header_desc[] = { +diff --git a/netlink/parser.c b/netlink/parser.c +index fff23f2..d790abe 100644 +--- a/netlink/parser.c ++++ b/netlink/parser.c +@@ -1016,7 +1016,7 @@ int nl_parser(struct nl_context *nlctx, const struct param_parser *params, + buff = tmp_buff_find(buffs, parser->group); + msgbuff = buff ? &buff->msgbuff : &nlsk->msgbuff; + +- param_dest = dest ? (dest + parser->dest_offset) : NULL; ++ param_dest = dest ? ((char *)dest + parser->dest_offset) : NULL; + ret = parser->handler(nlctx, parser->type, parser->handler_data, + msgbuff, param_dest); + if (ret < 0) +-- +2.20.1 + -- 2.30.2