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.
This commit is contained in:
Ondrej Zajicek (work) 2017-09-04 22:32:45 +02:00
parent 96eace1ea7
commit 9befc7cc4f

View file

@ -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))