From 97446a51539235fbcb62c1c4de914096fbb104a2 Mon Sep 17 00:00:00 2001 From: Eric Jackson Date: Mon, 8 Oct 2001 22:32:30 +0000 Subject: force alignment, makes dhcp work on alpha's from netbsd. deraadt@ Ok. --- usr.sbin/dhcp/common/dispatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/dhcp/common/dispatch.c b/usr.sbin/dhcp/common/dispatch.c index 96ce31a8543..c6f005456a5 100644 --- a/usr.sbin/dhcp/common/dispatch.c +++ b/usr.sbin/dhcp/common/dispatch.c @@ -185,10 +185,11 @@ void discover_interfaces (state) if (ifp -> ifr_addr.sa_family == AF_INET) { struct iaddr addr; + void *ptr; /* Get a pointer to the address... */ - memcpy (&foo, &ifp -> ifr_addr, - sizeof ifp -> ifr_addr); + ptr = &ifp->ifr_addr; + memcpy(&foo, ptr, sizeof(ifp->ifr_addr)); /* We don't want the loopback interface. */ if (foo.sin_addr.s_addr == htonl (INADDR_LOOPBACK)) -- cgit v1.2.3