]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: fix compilation in 32bit platform
authorJorge Boncompte <jbonor@gmail.com>
Tue, 25 Jul 2017 09:46:01 +0000 (11:46 +0200)
committerJorge Boncompte <jbonor@gmail.com>
Fri, 4 Aug 2017 08:19:36 +0000 (10:19 +0200)
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 <jbonor@gmail.com>
zebra/rt_netlink.c

index 9b31e467c7e28d3589afa8896f5a444220fac80b..887ea4794d91fb4c51bf5a1d6b62cf9bdbfeabc9 100644 (file)
@@ -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;
                        }