]> git.ipfire.org Git - thirdparty/lldpd.git/commit
bsd: fix clang warning about alignment problem with sockaddr
authorVincent Bernat <vincent@bernat.im>
Thu, 15 May 2014 23:08:27 +0000 (01:08 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 15 May 2014 23:08:27 +0000 (01:08 +0200)
commit3d596bbefdd9f1e2b921bbb6dafcf3c06abab4f1
tree1262b52df2bc4a7812a00646803279095baa9b35
parentdd82040caf7ddd666ab3c1e86dde45cad46a843e
bsd: fix clang warning about alignment problem with sockaddr

While this does not seem to be extensively documented, when casting a
`sockaddr *` to something else, like `sockaddr_dl *`, it is believed
that initially, it was a `sockaddr_dl *`, so there is no alignment
problem in this case. We use a macro to cast to `void *` to avoid the
warning.
src/daemon/interfaces-bsd.c
src/daemon/lldpd.h
src/daemon/priv.c