]> git.proxmox.com Git - mirror_frr.git/commitdiff
Fix alignment assumptions on non-RT_ROUNDUP platforms.
authorGreg Troxel <gdt@ir.bbn.com>
Mon, 23 Mar 2015 19:16:29 +0000 (15:16 -0400)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:25:14 +0000 (15:25 +0000)
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.

(cherry picked from commit 941789e470199df4f612368f669ecc0fd096fb9a)

zebra/kernel_socket.c

index 5d5206a2f92bc0f37c1b202a8668b01ae058ca98..10fb2d2631689d5ebab098cae01e3c2800fd7dd4 100644 (file)
@@ -79,9 +79,9 @@ extern struct zebra_privs_t zserv_privs;
 
 /* 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) \