From: David Lamparter Date: Wed, 16 Sep 2015 04:55:38 +0000 (-0700) Subject: zebra/rt_socket: Fix warnings X-Git-Tag: frr-2.0-rc1~703 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=746c4f02957007a477e6a501f8741779f0510610;p=mirror%2Ffrr.git zebra/rt_socket: Fix warnings Fix warning about unused sin_masklen / sin6_masklen Signed-off-by: David Lamparter (cherry picked from commit 8fa1d027f23115dcb1c38b09c6e46edf5b8f7238) --- diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index ca2ddc1fc6..ee1c696fb6 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -41,6 +41,7 @@ extern int rtm_write (int message, union sockunion *dest, union sockunion *mask, union sockunion *gate, unsigned int index, int zebra_flags, int metric); +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN /* Adjust netmask socket length. Return value is a adjusted sin_len value. */ static int @@ -63,6 +64,7 @@ sin_masklen (struct in_addr mask) len--; return len; } +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Interface between zebra message and rtm message. */ static int @@ -252,6 +254,7 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib) #ifdef HAVE_IPV6 +#ifdef SIN6_LEN /* Calculate sin6_len value for netmask socket value. */ static int sin6_masklen (struct in6_addr mask) @@ -279,6 +282,7 @@ sin6_masklen (struct in6_addr mask) return len; } +#endif /* SIN6_LEN */ /* Interface between zebra message and rtm message. */ static int @@ -439,6 +443,8 @@ kernel_rtm_ipv6_multipath (int cmd, struct prefix *p, struct rib *rib, zlog_info ("kernel_rtm_ipv6_multipath(): nexthop %d add error=%d.", nexthop_num, error); } +#else + (void)error; #endif nexthop_num++;