Module Name:    src
Committed By:   dholland
Date:           Mon Aug 31 05:36:23 UTC 2009

Modified Files:
        src/sys/compat/irix: irix_kmem.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/irix/irix_kmem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/irix/irix_kmem.c
diff -u src/sys/compat/irix/irix_kmem.c:1.9 src/sys/compat/irix/irix_kmem.c:1.10
--- src/sys/compat/irix/irix_kmem.c:1.9	Sat Mar 14 21:04:18 2009
+++ src/sys/compat/irix/irix_kmem.c	Mon Aug 31 05:36:23 2009
@@ -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 @@
 	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;

Reply via email to