diff options
author | sommerfeld <sommerfeld> | 2000-01-16 00:51:06 +0000 |
---|---|---|
committer | sommerfeld <sommerfeld> | 2000-01-16 00:51:06 +0000 |
commit | a5e82805cc884f9b7aa67ec6f9b843e2f45deaee (patch) | |
tree | d1d96165cbff0f9835adbba838b08f83931cc308 /mail/postfix/patches | |
parent | 6651135f3c63e59a920ecbaeb79f58ca86d7962d (diff) | |
download | pkgsrc-a5e82805cc884f9b7aa67ec6f9b843e2f45deaee.tar.gz |
Avoid misaligned loads on alpha in util/inet_addr_local.c: copy *ifr in
such a way that gcc doesn't make unwarranted assumptions about the
alignment of *ifr. Simply casting to (char *) wasn't sufficient.
Diffstat (limited to 'mail/postfix/patches')
-rw-r--r-- | mail/postfix/patches/patch-bs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mail/postfix/patches/patch-bs b/mail/postfix/patches/patch-bs new file mode 100644 index 00000000000..756ca03b67f --- /dev/null +++ b/mail/postfix/patches/patch-bs @@ -0,0 +1,22 @@ +$NetBSD: patch-bs,v 1.1 2000/01/16 00:51:07 sommerfeld Exp $ + +--- util/inet_addr_local.c.orig Fri Aug 27 08:08:43 1999 ++++ util/inet_addr_local.c Sat Jan 15 17:41:30 2000 +@@ -42,6 +42,7 @@ + #include <sys/sockio.h> + #endif + #include <errno.h> ++#include <string.h> + + /* Utility library. */ + +@@ -114,7 +115,8 @@ + the_end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len); + for (ifr = ifc.ifc_req; ifr < the_end;) { + if (ifr->ifr_addr.sa_family == AF_INET) { /* IP interface */ +- ifreq = *ifr; ++ char *ifrp = (char *)ifr; ++ memcpy(&ifreq, ifrp, sizeof(*ifr)); + if (ioctl(sock, SIOCGIFFLAGS, (char *) &ifreq) < 0) + msg_fatal("%s: ioctl SIOCGIFFLAGS: %m", myname); + if (ifreq.ifr_flags & IFF_UP) { /* active interface */ |