[quagga-dev 12123] [PATCH] Fix alignment assumptions on non-RT_ROUNDUP platforms.

Greg Troxel gdt at ir.bbn.com
Mon Mar 23 19:51:05 GMT 2015

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.
 zebra/kernel_socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 1518c1a..7553491 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
 #define ROUNDUP_TYPE	int
+#define ROUNDUP_TYPE	long
 #define ROUNDUP(a) \

More information about the Quagga-dev mailing list