[ovs-dev] [PATCH 12/18] use RT_ROUNDUP on NetBSD

YAMAMOTO Takashi yamamoto at valinux.co.jp
Thu Jan 31 10:49:46 UTC 2013


From: YAMAMOTO Takashi <yamt at mwd.biglobe.ne.jp>

Signed-off-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
---
 lib/route-table-bsd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/route-table-bsd.c b/lib/route-table-bsd.c
index eb4a168..38cd2c9 100644
--- a/lib/route-table-bsd.c
+++ b/lib/route-table-bsd.c
@@ -97,7 +97,13 @@ route_table_get_name(ovs_be32 ip, char name[IFNAMSIZ])
                 name[namelen] = '\0';
                 return true;
             }
+#if defined(__FreeBSD__)
             sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa));
+#elif defined(__NetBSD__)
+            sa = (struct sockaddr *)((char *)sa + RT_ROUNDUP(sa->sa_len));
+#else
+#error unimplemented
+#endif
         }
     }
     return false;
-- 
1.7.12




More information about the dev mailing list