iproute2: Fix build failure on ppc64
PATCH 1/1 iproute2: Fix build failure on ppc64
From: Ting Liu <[email protected]>
Backport three patches from upstream for ppc64:
http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git
ae70d96 ipntable: more fixes for ppc64
a55a8fd fix dependency on sizeof(__u64) == sizeof(unsigned long long) a7c2882 ip: fix ipv6 ntable on ppc64
Signed-off-by Ting Liu <[email protected]>
--- .../0001-ip-fix-ipv6-ntable-on-ppc64.patch | 142 +++++++++++++ ...ncy-on-sizeof-__u64-sizeof-unsigned-long-.patch | 213 ++++++++++++++++++++ .../0004-ipntable-more-fixes-for-ppc64.patch | 68 +++++++ .../iproute2/iproute2_3.8.0.bb | 5 +- 4 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-ip-fix-ipv6-ntable-on-ppc64.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0003-fix-dependency-on-sizeof-__u64-sizeof-unsigned-long-.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0004-ipntable-more-fixes-for-ppc64.patch
meta/recipes-connectivity/iproute2/iproute2/0001-ip-fix-ipv6-ntable-on-ppc64.patch new file +142 -0
@@ -0,0 +1,142 @@ +Upstream-Status: Backport + +From a7c2882461581747488e5aabf10d19b46b371a01 Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger <[email protected]> +Date: Wed, 27 Feb 2013 07:26:17 -0800 +Subject: [PATCH] ip: fix ipv6 ntable on ppc64 + +Add casts to handle printf format when + sizeof(unsigned long long) != sizeof(__u64) +--- + ip/ipntable.c | 56 +++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 37 insertions(+), 19 deletions(-) + +diff --git a/ip/ipntable.c b/ip/ipntable.c +index 5751114..56ad001 100644 +--- a/ip/ipntable.c ++++ b/ip/ipntable.c +@@ -432,7 +432,7 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + } + if (tb[NDTA_GC_INTERVAL]) { + __u64 gc_int = rta_getattr_u64(tb[NDTA_GC_INTERVAL]); +- fprintf(fp, "gc_int %llu ", gc_int); ++ fprintf(fp, "gc_int %llu ", (unsigned long long) gc_int); + } + + if (ret) +@@ -485,15 +485,18 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + } + if (tpb[NDTPA_REACHABLE_TIME]) { + __u64 reachable = rta_getattr_u64(tpb[NDTPA_REACHABLE_TIME]); +- fprintf(fp, "reachable %llu ", reachable); ++ fprintf(fp, "reachable %llu ", ++ (unsigned long long) reachable); + } + if (tpb[NDTPA_BASE_REACHABLE_TIME]) { + __u64 breachable = rta_getattr_u64(tpb[NDTPA_BASE_REACHABLE_TIME]); +- fprintf(fp, "base_reachable %llu ", breachable); ++ fprintf(fp, "base_reachable %llu ", ++ (unsigned long long) breachable); + } + if (tpb[NDTPA_RETRANS_TIME]) { + __u64 retrans = rta_getattr_u64(tpb[NDTPA_RETRANS_TIME]); +- fprintf(fp, "retrans %llu ", retrans); ++ fprintf(fp, "retrans %llu ", ++ (unsigned long long) retrans); + } + + fprintf(fp, "%s", _SL_); +@@ -502,11 +505,13 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + + if (tpb[NDTPA_GC_STALETIME]) { + __u64 gc_stale = rta_getattr_u64(tpb[NDTPA_GC_STALETIME]); +- fprintf(fp, "gc_stale %llu ", gc_stale); ++ fprintf(fp, "gc_stale %llu ", ++ (unsigned long long) gc_stale); + } + if (tpb[NDTPA_DELAY_PROBE_TIME]) { + __u64 delay_probe = rta_getattr_u64(tpb[NDTPA_DELAY_PROBE_TIME]); +- fprintf(fp, "delay_probe %llu ", delay_probe); ++ fprintf(fp, "delay_probe %llu ", ++ (unsigned long long) delay_probe); + } + if (tpb[NDTPA_QUEUE_LEN]) { + __u32 queue = rta_getattr_u32(tpb[NDTPA_QUEUE_LEN]); +@@ -536,11 +541,13 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + + if (tpb[NDTPA_ANYCAST_DELAY]) { + __u64 anycast_delay = rta_getattr_u64(tpb[NDTPA_ANYCAST_DELAY]); +- fprintf(fp, "anycast_delay %llu ", anycast_delay); ++ fprintf(fp, "anycast_delay %llu ", ++ (unsigned long long) anycast_delay); + } + if (tpb[NDTPA_PROXY_DELAY]) { + __u64 proxy_delay = rta_getattr_u64(tpb[NDTPA_PROXY_DELAY]); +- fprintf(fp, "proxy_delay %llu ", proxy_delay); ++ fprintf(fp, "proxy_delay %llu ", ++ (unsigned long long) proxy_delay); + } + if (tpb[NDTPA_PROXY_QLEN]) { + __u32 pqueue = rta_getattr_u32(tpb[NDTPA_PROXY_QLEN]); +@@ -548,7 +555,8 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + } + if (tpb[NDTPA_LOCKTIME]) { + __u64 locktime = rta_getattr_u64(tpb[NDTPA_LOCKTIME]); +- fprintf(fp, "locktime %llu ", locktime); ++ fprintf(fp, "locktime %llu ", ++ (unsigned long long) locktime); + } + + fprintf(fp, "%s", _SL_); +@@ -560,28 +568,38 @@ int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) + fprintf(fp, " "); + fprintf(fp, "stats "); + +- fprintf(fp, "allocs %llu ", ndts->ndts_allocs); +- fprintf(fp, "destroys %llu ", ndts->ndts_destroys); +- fprintf(fp, "hash_grows %llu ", ndts->ndts_hash_grows); ++ fprintf(fp, "allocs %llu ", ++ (unsigned long long) ndts->ndts_allocs); ++ fprintf(fp, "destroys %llu ", ++ (unsigned long long) ndts->ndts_destroys); ++ fprintf(fp, "hash_grows %llu ", ++ (unsigned long long) ndts->ndts_hash_grows); + + fprintf(fp, "%s", _SL_); + fprintf(fp, " "); + +- fprintf(fp, "res_failed %llu ", ndts->ndts_res_failed); +- fprintf(fp, "lookups %llu ", ndts->ndts_lookups); +- fprintf(fp, "hits %llu ", ndts->ndts_hits); ++ fprintf(fp, "res_failed %llu ", ++ (unsigned long long) ndts->ndts_res_failed); ++ fprintf(fp, "lookups %llu ", ++ (unsigned long long) ndts->ndts_lookups); ++ fprintf(fp, "hits %llu ", ++ (unsigned long long) ndts->ndts_hits); + + fprintf(fp, "%s", _SL_); + fprintf(fp, " "); + +- fprintf(fp, "rcv_probes_mcast %llu ", ndts->ndts_rcv_probes_mcast); +- fprintf(fp, "rcv_probes_ucast %llu ", ndts->ndts_rcv_probes_ucast); ++ fprintf(fp, "rcv_probes_mcast %llu ", ++ (unsigned long long) ndts->ndts_rcv_probes_mcast); ++ fprintf(fp, "rcv_probes_ucast %llu ", ++ (unsigned long long) ndts->ndts_rcv_probes_ucast); + + fprintf(fp, "%s", _SL_); + fprintf(fp, " "); + +- fprintf(fp, "periodic_gc_runs %llu ", ndts->ndts_periodic_gc_runs); +- fprintf(fp, "forced_gc_runs %llu ", ndts->ndts_forced_gc_runs); ++ fprintf(fp, "periodic_gc_runs %llu ", ++ (unsigned long long) ndts->ndts_periodic_gc_runs); ++ fprintf(fp, "forced_gc_runs %llu ", ++ (unsigned long long) ndts->ndts_forced_gc_runs); + + fprintf(fp, "%s", _SL_); + } +-- +1.7.9.7 +
meta/recipes-connectivity/iproute2/iproute2/0003-fix-dependency-on-sizeof-__u64-sizeof-unsigned-long-.patch new file +213 -0
213 lines not on this page · raw message
meta/recipes-connectivity/iproute2/iproute2/0004-ipntable-more-fixes-for-ppc64.patch new file +68 -0
68 lines not on this page · raw message
meta/recipes-connectivity/iproute2/iproute2_3.8.0.bb +4 -1
@@ -1,10 +1,13 @@ require iproute2.inc -PR = "r1" +PR = "r2" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BPN}-${PV}.tar.xz \ file://configure-cross.patch \ file://0001-Fix-compilation-error-of-m_ipt.c-with-Werror-enabled.patch \ + file://0001-ip-fix-ipv6-ntable-on-ppc64.patch \ + file://0003-fix-dependency-on-sizeof-__u64-sizeof-unsigned-long-.patch \ + file://0004-ipntable-more-fixes-for-ppc64.patch \ " SRC_URI[md5sum] = "951622fd770428116dc165acba375414"
Signature · 1 line
1.7.9.7