Subject: Re: build problem
To: Emmanuel Dreyfus <>
From: Jaromír <>
List: tech-kern
Date: 06/02/2001 13:36:57
Emmanuel Dreyfus wrote:
>                   error = copyout (retval,
>                       (caddr_t)SCARG(&pta, data),
>                       sizeof retval);
> ...
> It works fine at mine (macppc), but I was told that build fails on
> alpha. The person that reported it was able to build by replacing
> (caddr_t)SCARG(&pta, data)
> by
> (caddr_t)(u_long)SCARG(&pta, data)
> I don't understand why it fails

I guess this is due to int having different size than pointer
on alpha. If you want to cast the int to pointer, you need
to cast it to long first (it's my understanding long is same size
as a pointer on alpha).

BTW, it could be useful to add a comment why the copyout is necessary
for Linux. I wonder why they don't just use the return value from ptrace(2).
Maybe another fallout of Linux using negative syscall return value
as error indication?

Jaromir Dolecek <>
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!