summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2003-05-13 20:31:59 +0000
committermiod <miod@openbsd.org>2003-05-13 20:31:59 +0000
commitf2cca587c738bd5e1cda0abe0fdf37f7dd1b509d (patch)
treeaa869c2875049c50e12a65d4a7ab1b15a414e4d0 /sys/kern/kern_clock.c
parentDon't reformat output beyond a minimum terminal width (60). (diff)
downloadwireguard-openbsd-f2cca587c738bd5e1cda0abe0fdf37f7dd1b509d.tar.xz
wireguard-openbsd-f2cca587c738bd5e1cda0abe0fdf37f7dd1b509d.zip
Force "struct timeval time" variable to be aligned to an 8-bit boundary.
This is at least necessary for the sparc microtime() function, and was only working before by goat luck. The recent commons removal triggered it. __atribute__ syntax borrowed from NetBSD.
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 05eaad94e34..2e7c6dc1f39 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.40 2002/09/24 00:06:23 nordin Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.41 2003/05/13 20:31:59 miod Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -110,7 +110,8 @@ static int tickfixcnt; /* accumulated fractional error */
long cp_time[CPUSTATES];
-volatile struct timeval time;
+volatile struct timeval time
+ __attribute__((__aligned__(__alignof__(quad_t))));
volatile struct timeval mono_time;
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS