summaryrefslogtreecommitdiffstats
path: root/sys/compat/freebsd32/freebsd32_misc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-10-14 11:46:46 +0000
committerjhb <jhb@FreeBSD.org>2011-10-14 11:46:46 +0000
commit58bffa17cebc28425c847d421c8efbab951bdfa0 (patch)
tree40124fabfd282f6bf45e96c265ac00ad83193768 /sys/compat/freebsd32/freebsd32_misc.c
parent6f6341d894adecf4192cce202051a62b8ba404e6 (diff)
downloadFreeBSD-src-58bffa17cebc28425c847d421c8efbab951bdfa0.zip
FreeBSD-src-58bffa17cebc28425c847d421c8efbab951bdfa0.tar.gz
Use PAIR32TO64() for the offset and length parameters to
freebsd32_posix_fallocate() to properly handle big-endian platforms. Reviewed by: mdf MFC after: 1 week
Diffstat (limited to 'sys/compat/freebsd32/freebsd32_misc.c')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 45f9b21..6638ec8 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2831,7 +2831,7 @@ freebsd32_posix_fallocate(struct thread *td,
struct posix_fallocate_args ap;
ap.fd = uap->fd;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
- ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32));
+ ap.offset = PAIR32TO64(off_t, uap->offset);
+ ap.len = PAIR32TO64(off_t, uap->len);
return (sys_posix_fallocate(td, &ap));
}
OpenPOWER on IntegriCloud