summaryrefslogtreecommitdiffstats
path: root/lib/libc_r
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-03-05 04:28:08 +0000
committermarcel <marcel@FreeBSD.org>2003-03-05 04:28:08 +0000
commitcf2b37334bdcf41af17a17f34a5d80417cc188d8 (patch)
treead7af5a79602071961d395cb37fd8bce688e915c /lib/libc_r
parent55f069454e4e7e49b5d749bba14e2a788bcdf7a1 (diff)
downloadFreeBSD-src-cf2b37334bdcf41af17a17f34a5d80417cc188d8.zip
FreeBSD-src-cf2b37334bdcf41af17a17f34a5d80417cc188d8.tar.gz
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.
Diffstat (limited to 'lib/libc_r')
-rw-r--r--lib/libc_r/uthread/uthread_sig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c
index b99c64d..e02ccc3 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
OpenPOWER on IntegriCloud