diff options
author | 2010-08-29 11:27:19 +0000 | |
---|---|---|
committer | 2010-08-29 11:27:19 +0000 | |
commit | c7c13d1a658600f1d9bbb932b6d4b48750da66d5 (patch) | |
tree | 313bdd14311031f52e30e6a635536edca34a519c /sys/dev/usb/usbdevs.h | |
parent | Fix kernel compiling with disabled IPSEC and enabled GIF/MPLS (diff) | |
download | wireguard-openbsd-c7c13d1a658600f1d9bbb932b6d4b48750da66d5.tar.xz wireguard-openbsd-c7c13d1a658600f1d9bbb932b6d4b48750da66d5.zip |
Make sure local arrays of chars are word-aligned on strict alignment
architectures, just like what is done for global ones. This isn't
just an optiization. There is a long tradition of building packets in
arrays of chars on the stack by using casts to types that require
stricter alignment. Ignore the language lawyers say it isn't
explicitly allowed by the C standard. Historically many (all?) C
compilers have handled that just fine, so it is stupid to break this.
Thanks to mikeb@ for finding the GCC bug report against upstream GCC
4.2.1. This fixes hppa/hppa64 and sparc/sparc64 as discuessed with
miod@ (upstream only fixed sparc/sparc64). Other strict alignment
architectures will need similar fixes.
ok deraadt@, mikeb@, miod@
Diffstat (limited to 'sys/dev/usb/usbdevs.h')
0 files changed, 0 insertions, 0 deletions