summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_elf.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2010-05-02 11:15:29 +0000
committerkettenis <kettenis@openbsd.org>2010-05-02 11:15:29 +0000
commit885b52e9d7742ec3856eeb0b1cdd6fc162b4bf9c (patch)
tree2e506c7ef9915dbaacff4831d3d48cee7ca0ec9e /sys/kern/exec_elf.c
parentDon't systematically fill with silence the mixer output. This (diff)
downloadwireguard-openbsd-885b52e9d7742ec3856eeb0b1cdd6fc162b4bf9c.tar.xz
wireguard-openbsd-885b52e9d7742ec3856eeb0b1cdd6fc162b4bf9c.zip
Use intermediate vaddr_t cast when casting a pointer to off_t. Prevents
gcc4 from complaining about casting a pointer to an integer type of different size. ok guenther@, jsg@
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r--sys/kern/exec_elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 31399169905..882bbd12f4b 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.72 2010/01/14 23:12:11 schwarze Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.73 2010/05/02 11:15:29 kettenis Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -1198,7 +1198,7 @@ ELFNAMEEND(coredump_notes)(struct proc *p, void *iocookie, size_t *sizep)
iov.iov_len = sizeof(pss);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
- uio.uio_offset = (off_t)PS_STRINGS;
+ uio.uio_offset = (off_t)(vaddr_t)PS_STRINGS;
uio.uio_resid = sizeof(pss);
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = UIO_READ;