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.
This commit is contained in:
bde 2003-09-07 13:03:13 +00:00
parent 1477dfc054
commit e61929ee3e

View File

@ -416,7 +416,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
goto cleanup; goto cleanup;
/* copy from kernel VM space to user space */ /* 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); (void *)vmaddr, a_out->a_text + a_out->a_data);
/* release temporary kernel space */ /* release temporary kernel space */