]> git.ipfire.org Git - thirdparty/lldpd.git/commit
netlink: fix bogus alignment warnings
authorVincent Bernat <bernat@luffy.cx>
Sun, 23 Dec 2012 15:26:38 +0000 (16:26 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sun, 23 Dec 2012 22:11:07 +0000 (23:11 +0100)
commit2fafbd309cac8e7d66892d92b26900fe0f34d32e
treeb1a7c34bd7b69728da1c41ecc006d5d8a827a31d
parent2d1fe392f355d7c3b1fd5b5bbaa1f164e755242d
netlink: fix bogus alignment warnings

The fix is stolen from XORP: we insert an intermediate cast to
`(void*)` to avoid the warning. Netlink stuff is already taking care
of the alignment issue, the compiler just doesn't know. This means
that the headers we copied from the kernel should be modified with:

     sed -i -e 's/\*)(((char\*/*)(void*)(((char*/g' \
            -e 's/(void\*)(void\*)/(void*)/g' include/**/*.h
include/linux/if_addr.h
include/linux/if_link.h
include/linux/netlink.h
include/linux/rtnetlink.h
src/daemon/netlink.c