summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2001-10-08 22:32:30 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2001-10-08 22:32:30 +0000
commit97446a51539235fbcb62c1c4de914096fbb104a2 (patch)
tree261314b9094e090bb59cb6fde94ad711c5227dc2 /usr.sbin
parent3ba9ee3a08ecf43ecde3037eb5f5fc9ea8b26366 (diff)
force alignment, makes dhcp work on alpha's
from netbsd. deraadt@ Ok.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcp/common/dispatch.c5
1 files 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))