summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2014-03-16 00:53:40 +0000
committerjmg <jmg@FreeBSD.org>2014-03-16 00:53:40 +0000
commitb66f059b49e9d4c8e6053415f4e4d4c95a1d6355 (patch)
tree59a8765c3a1415fa4b57a58fdbafad794de0152c /sys/compat
parent54604392955d3fc50e09e5e00fc76dcd17bdb444 (diff)
downloadFreeBSD-src-b66f059b49e9d4c8e6053415f4e4d4c95a1d6355.zip
FreeBSD-src-b66f059b49e9d4c8e6053415f4e4d4c95a1d6355.tar.gz
change td_retval into a union w/ off_t, with defines to mask the
change... This eliminates a cast, and also forces td_retval (often 2 32-bit registers) to be aligned so that off_t's can be stored there on arches with strict alignment requirements like armeb (AVILA)... On i386, this doesn't change alignment, and on amd64 it doesn't either, as register_t is already 64bits... This will also prevent future breakage due to people adding additional fields to the struct... This gets AVILA booting a bit farther... Reviewed by: bde
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index c7b677f..749c91d 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1504,7 +1504,7 @@ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap)
ap.whence = uap->whence;
error = sys_lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
- pos = *(off_t *)(td->td_retval);
+ pos = td->td_uretoff.tdu_off;
td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */
td->td_retval[RETVAL_HI] = pos >> 32; /* %edx */
return error;
OpenPOWER on IntegriCloud