summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtsold/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rtsold/if.c')
-rw-r--r--usr.sbin/rtsold/if.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c
index 58ec514..2bf946d 100644
--- a/usr.sbin/rtsold/if.c
+++ b/usr.sbin/rtsold/if.c
@@ -61,7 +61,6 @@
#include <ifaddrs.h>
#include "rtsold.h"
-extern int rssock;
static int ifsock;
static int get_llflag(const char *);
@@ -304,13 +303,13 @@ if_nametosdl(char *name)
lim = buf + len;
for (next = buf; next < lim; next += ifm->ifm_msglen) {
- ifm = (struct if_msghdr *)next;
+ ifm = (struct if_msghdr *)(void *)next;
if (ifm->ifm_type == RTM_IFINFO) {
sa = (struct sockaddr *)(ifm + 1);
get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
if ((sa = rti_info[RTAX_IFP]) != NULL) {
if (sa->sa_family == AF_LINK) {
- sdl = (struct sockaddr_dl *)sa;
+ sdl = (struct sockaddr_dl *)(void *)sa;
if (strlen(name) != sdl->sdl_nlen)
continue; /* not same len */
if (strncmp(&sdl->sdl_data[0],
@@ -397,7 +396,7 @@ get_llflag(const char *name)
continue;
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
- sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
+ sin6 = (struct sockaddr_in6 *)(void *)ifa->ifa_addr;
if (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
continue;
OpenPOWER on IntegriCloud