From cf2b37334bdcf41af17a17f34a5d80417cc188d8 Mon Sep 17 00:00:00 2001 From: marcel Date: Wed, 5 Mar 2003 04:28:08 +0000 Subject: [PATCH] Don't cast an int to a pointer type without (possibly) widening the integral type to the size of a pointer type when it's known that the cast is valid. On ia64 such casts are generally bad news and has led us (=peter :-) to make such casts fatal. By casting to intptr_t before casting to a pointer type, this now compiles cleanly in LP64 architectures. Note that the final cast has been changed to void* (instead of siginfo_t*) to make it explicit that we're not trying to pass a siginfo_t pointer but rather trying to pass an int when the prototype says it should be a pointer. --- lib/libc_r/uthread/uthread_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c index b99c64d440ff..e02ccc369add 100644 --- a/lib/libc_r/uthread/uthread_sig.c +++ b/lib/libc_r/uthread/uthread_sig.c @@ -282,7 +282,7 @@ thread_sig_invoke_handler(int sig, siginfo_t *info, ucontext_t *ucp) (info == NULL)) (*(sigfunc))(sig, info, ucp); else - (*(sigfunc))(sig, (siginfo_t *)info->si_code, ucp); + (*(sigfunc))(sig, (void*)(intptr_t)info->si_code, ucp); } /* * Only restore the signal mask if it hasn't been changed by the