Lines 1-29
Link Here
|
1 |
From 3e07588e6c2d11464b458cef3965ae31b5f99181 Mon Sep 17 00:00:00 2001 |
|
|
2 |
From: Greg Troxel <gdt@ir.bbn.com> |
3 |
Date: Mon, 23 Mar 2015 15:16:29 -0400 |
4 |
Subject: [PATCH] Fix alignment assumptions on non-RT_ROUNDUP platforms. |
5 |
|
6 |
The comment said that apple uses int and BSD traditionally used long, |
7 |
but the code was backwards. This fixes apple to be int, and otherwise |
8 |
long. That should make FreeBSD, which aligns to long, work correctly, |
9 |
even without using SA_SIZE. |
10 |
|
11 |
(cherry picked from commit 941789e470199df4f612368f669ecc0fd096fb9a) |
12 |
--- |
13 |
zebra/kernel_socket.c | 4 ++-- |
14 |
1 files changed, 2 insertions(+), 2 deletions(-) |
15 |
|
16 |
--- zebra/kernel_socket.c.orig 2015-03-07 06:58:00 UTC |
17 |
+++ zebra/kernel_socket.c |
18 |
@@ -78,9 +78,9 @@ extern struct zebra_t zebrad; |
19 |
|
20 |
/* OS X (Xcode as of 2014-12) is known not to define RT_ROUNDUP */ |
21 |
#ifdef __APPLE__ |
22 |
-#define ROUNDUP_TYPE long |
23 |
-#else |
24 |
#define ROUNDUP_TYPE int |
25 |
+#else |
26 |
+#define ROUNDUP_TYPE long |
27 |
#endif |
28 |
|
29 |
#define ROUNDUP(a) \ |