summaryrefslogtreecommitdiffstats
path: root/net/tap-linux.c
diff options
context:
space:
mode:
authorPeter Maydell2019-01-22 19:18:21 +0100
committerSamuel Thibault2019-02-07 14:49:08 +0100
commitc74e3ae9c83750705abaa583b28741d349364561 (patch)
tree2c344866635145a63a12c4891b84f9ed16c15388 /net/tap-linux.c
parentslirp: Avoid unaligned 16bit memory access (diff)
downloadqemu-c74e3ae9c83750705abaa583b28741d349364561.tar.gz
qemu-c74e3ae9c83750705abaa583b28741d349364561.tar.xz
qemu-c74e3ae9c83750705abaa583b28741d349364561.zip
slirp: Avoid marking naturally packed structs as QEMU_PACKED
Various ipv6 structs in the slirp headers are marked QEMU_PACKED, but they are actually naturally aligned and will have no padding in them. Instead of marking them with the 'packed' attribute, assert at compile time that they are the size we expect. This allows us to take the address of fields within the structs without risking undefined behaviour, and suppresses clang -Waddress-of-packed-member warnings. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net/tap-linux.c')
0 files changed, 0 insertions, 0 deletions