From d10f3ce07f31c663f8b55971d53df735851ec79e Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Mon, 21 May 2007 14:38:20 +0000 Subject: [PATCH] Force the alignment of the chars arrays, as they are casted later to structs. gcc 4.2 doesn't do it by default, and that results in unaligned access on arm. Reviewed by: gnn, imp --- sys/netinet6/nd6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 5bb8a66bb4f..d1a5e83cc4a 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2309,7 +2309,7 @@ static int nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) { int error; - char buf[1024]; + char buf[1024] __aligned(4); struct in6_defrouter *d, *de; struct nd_defrouter *dr; @@ -2347,7 +2347,7 @@ static int nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) { int error; - char buf[1024]; + char buf[1024] __aligned(4); struct in6_prefix *p, *pe; struct nd_prefix *pr; char ip6buf[INET6_ADDRSTRLEN];