From 34eec0a16944aa32a0a1e93a0cf588911d14be53 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 7 Sep 2003 13:03:13 +0000 Subject: [PATCH] Restored a non-egregious cast so that this file compiles on i386's with 64-bit longs again. This was fixed in rev.1.42 but the fix rotted non-fatally in rev.1.105 and fatally in rev.1.137. Many more non-egregrious casts are strictly required for conversions from semi-opaque types to pointers, but we avoid most of them by using types that are almost certain to be compatible with uintptr_t for representing pointers (e.g., vm_offset_t). Here we don't really want the u_longs, but we have them because a.out.h and its support code doesn't use typedefs (it uses unsigned in V7 and unsigned long in FreeBSD) and is too obsolete to fix now. --- sys/compat/linux/linux_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 5797700b495..f271482032f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -416,7 +416,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) goto cleanup; /* copy from kernel VM space to user space */ - error = copyout((void *)(buffer + file_offset), + error = copyout((void *)(uintptr_t)(buffer + file_offset), (void *)vmaddr, a_out->a_text + a_out->a_data); /* release temporary kernel space */