Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/route6d reenable routing functionality by using RT_...



details:   https://anonhg.NetBSD.org/src/rev/a7c2acf9bb90
branches:  trunk
changeset: 786097:a7c2acf9bb90
user:      kardel <kardel%NetBSD.org@localhost>
date:      Mon Apr 15 07:58:35 2013 +0000

description:
reenable routing functionality by using RT_ROUNDUP for ROUNDUP when available

diffstat:

 usr.sbin/route6d/route6d.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r b89101ff3dd7 -r a7c2acf9bb90 usr.sbin/route6d/route6d.c
--- a/usr.sbin/route6d/route6d.c        Sun Apr 14 23:44:53 2013 +0000
+++ b/usr.sbin/route6d/route6d.c        Mon Apr 15 07:58:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $      */
+/*     $NetBSD: route6d.c,v 1.67 2013/04/15 07:58:35 kardel Exp $      */
 /*     $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $        */
 
 /*
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef        lint
-__RCSID("$NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.67 2013/04/15 07:58:35 kardel Exp $");
 #endif
 
 #include <stdbool.h>
@@ -83,8 +83,12 @@
 #endif
 
 /* alignment constraint for routing socket */
+#if defined(__NetBSD__) && defined(RT_ROUNDUP)
+#define ROUNDUP(a) RT_ROUNDUP(a)
+#else
 #define ROUNDUP(a) \
        ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#endif
 #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 
 /*



Home | Main Index | Thread Index | Old Index