From df0b13cf230f2460ab8f671d4a6d6dfb5a508148 Mon Sep 17 00:00:00 2001 From: Jorge Boncompte Date: Tue, 25 Jul 2017 11:46:01 +0200 Subject: zebra: fix compilation in 32bit platform RTA_PAYLOAD() return value depends on the platform bits. make[5]: Nothing to be done for 'all-am'. Making all in zebra CC rt_netlink.o ../../zebra/rt_netlink.c: In function 'netlink_macfdb_change': ../../zebra/rt_netlink.c:1695:63: error: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Werror=format=] "%s family %s IF %s(%u) brIF %u - LLADDR is not MAC, len %ld", ^ ../../zebra/rt_netlink.c: In function 'netlink_ipneigh_change': ../../zebra/rt_netlink.c:2024:57: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'unsigned int' [-Werror=format=] "%s family %s IF %s(%u) - LLADDR is not MAC, len %ld", ^ Signed-off-by: Jorge Boncompte --- zebra/rt_netlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zebra/rt_netlink.c') diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 9b31e467c..887ea4794 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1706,11 +1706,11 @@ static int netlink_macfdb_change(struct sockaddr_nl *snl, struct nlmsghdr *h, if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETHER_ADDR_LEN) { zlog_warn( - "%s family %s IF %s(%u) brIF %u - LLADDR is not MAC, len %ld", + "%s family %s IF %s(%u) brIF %u - LLADDR is not MAC, len %lu", nl_msg_type_to_str(h->nlmsg_type), nl_family_to_str(ndm->ndm_family), ifp->name, ndm->ndm_ifindex, zif->brslave_info.bridge_ifindex, - RTA_PAYLOAD(tb[NDA_LLADDR])); + (unsigned long)RTA_PAYLOAD(tb[NDA_LLADDR])); return 0; } @@ -2035,11 +2035,11 @@ static int netlink_ipneigh_change(struct sockaddr_nl *snl, struct nlmsghdr *h, if (tb[NDA_LLADDR]) { if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETHER_ADDR_LEN) { zlog_warn( - "%s family %s IF %s(%u) - LLADDR is not MAC, len %ld", + "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu", nl_msg_type_to_str(h->nlmsg_type), nl_family_to_str(ndm->ndm_family), ifp->name, ndm->ndm_ifindex, - RTA_PAYLOAD(tb[NDA_LLADDR])); + (unsigned long)RTA_PAYLOAD(tb[NDA_LLADDR])); return 0; } -- cgit v1.2.3