nhorman / dropwatch

user space utility to interface to kernel dropwatch facility
GNU General Public License v2.0
633 stars 92 forks source link

Fix build issue when compiling with -Wcast-align #27

Closed nhorman closed 4 years ago

nhorman commented 4 years ago

Passing a char buffer cast to struct nlmsghdr * violates the rules of -Wcast-align on some arches, as described in : https://github.com/nhorman/dropwatch/issues/26

Fix it by declaring the buffer as a struct nlmsghdr, and casting to a less alligned type

Signed-off-by: Neil Horman nhorman@tuxdriver.com

resolves https://github.com/nhorman/dropwatch/issues/26

LeSpocky commented 4 years ago

Tested-by: Alexander Dahl <post@lespocky.de>