From: Ondrej Zajicek (work) Date: Mon, 4 Sep 2017 20:32:45 +0000 (+0200) Subject: BSD: Fix alignment issue X-Git-Tag: v2.0.0~17^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9befc7cc4f26889077ace537019de92903139133;p=thirdparty%2Fbird.git BSD: Fix alignment issue Incorrect structure alignment breaks kernel routing table updates on FreeBSD/ARM (and perhaps other platforms). Thanks to Eugene Sevastyanov for the original patch. --- diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 9c9df51de..f0cebd11c 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -168,7 +168,7 @@ struct ks_msg { struct rt_msghdr rtm; struct sockaddr_storage buf[RTAX_MAX]; -}; +} PACKED; #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))