zebra/rt_socket: Fix warnings
Fix warning about unused sin_masklen / sin6_masklen
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index bf21ca9..a7ef457 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -41,6 +41,7 @@
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 @@
len--;
return len;
}
+#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
/* Interface between zebra message and rtm message. */
static int
@@ -244,6 +246,7 @@
#ifdef HAVE_IPV6
+#ifdef SIN6_LEN
/* Calculate sin6_len value for netmask socket value. */
static int
sin6_masklen (struct in6_addr mask)
@@ -266,6 +269,7 @@
return len;
}
+#endif /* SIN6_LEN */
/* Interface between zebra message and rtm message. */
static int
@@ -368,6 +372,8 @@
zlog_info ("kernel_rtm_ipv6_multipath(): nexthop %d add error=%d.",
nexthop_num, error);
}
+#else
+ (void)error;
#endif
nexthop_num++;