diff options
author | Greg Troxel <gdt@ir.bbn.com> | 2015-03-23 15:16:29 -0400 |
---|---|---|
committer | Greg Troxel <gdt@ir.bbn.com> | 2015-03-23 15:16:29 -0400 |
commit | 941789e470199df4f612368f669ecc0fd096fb9a (patch) | |
tree | 7320a1dad4346e06a77d786274d8e8962688db00 | |
parent | ec62e1438ece9af0546f9028aa1403f2c84bf177 (diff) | |
download | quagga-941789e470199df4f612368f669ecc0fd096fb9a.tar.bz2 quagga-941789e470199df4f612368f669ecc0fd096fb9a.tar.xz |
Fix alignment assumptions on non-RT_ROUNDUP platforms.
The comment said that apple uses int and BSD traditionally used long,
but the code was backwards. This fixes apple to be int, and otherwise
long. That should make FreeBSD, which aligns to long, work correctly,
even without using SA_SIZE.
-rw-r--r-- | zebra/kernel_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 1518c1ab..75534916 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -78,9 +78,9 @@ extern struct zebra_t zebrad; /* OS X (Xcode as of 2014-12) is known not to define RT_ROUNDUP */ #ifdef __APPLE__ -#define ROUNDUP_TYPE long -#else #define ROUNDUP_TYPE int +#else +#define ROUNDUP_TYPE long #endif #define ROUNDUP(a) \ |