From: Jorge Boncompte Date: Tue, 25 Jul 2017 09:46:01 +0000 (+0200) Subject: zebra: fix compilation in 32bit platform X-Git-Tag: frr-4.0-dev~455^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=df0b13cf230f2460ab8f671d4a6d6dfb5a508148;p=mirror%2Ffrr.git 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 --- diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 9b31e467c7..887ea4794d 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; }