Use uintptr_t instead of uint32_t as an intermediate stage when
casting from off_t to a pointer. This way it compiles in a 64-bit world. Dunno if it'll work though with 64-bit mips kernel addresses, which are in the negative range of 64-bit off_t.
This commit is contained in:
parent
97d7a71b45
commit
869e0ec654
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $ */
|
||||
/* $NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -95,7 +95,7 @@ irix_kmemread(dev_t dev, struct uio *uio, int flag)
|
||||
printf("irix_kmemread(): addr = %p\n", uio->uio_iov->iov_base);
|
||||
printf("irix_kmemread(): len = 0x%08lx\n", (long)uio->uio_iov->iov_len);
|
||||
#endif
|
||||
offset = (void *)(uint32_t)uio->uio_offset; /* XXX */
|
||||
offset = (void *)(uintptr_t)uio->uio_offset; /* XXX */
|
||||
if (offset == &averunnable) { /* load average */
|
||||
struct irix_loadavg iav;
|
||||
int scale = averunnable.fscale / IRIX_LOADAVG_SCALE;
|
||||
|
Loading…
Reference in New Issue
Block a user