[fpc-devel] broken shmat on x86_64-linux

Nikolay Nikolov nickysn at SexMagnet.com
Fri Sep 30 02:53:01 CEST 2005


Florian Klaempfl wrote:

>Nikolay Nikolov wrote:
>
>  
>
>>The 'shmat' function from the 'ipc' unit seems to be broken on
>>x86_64-linux. This patch seems to fix it.
>>(Apply to rtl/linux/ipcsys.inc)
>>
>>
>>------------------------------------------------------------------------
>>
>>35,36d34
>>< Var raddr : pointer;
>><     error : ptrint;
>>38,42c36
>><   error:=do_syscall(syscall_nr_SHMAT,TSysParam(shmid),TSysParam(shmflg),TSysParam(@raddr),TSysParam(shmaddr));
>><   If Error<0 then
>><     shmat:=pointer(error)
>><   else
>><     shmat:=raddr;
>>---
>>
>>    
>>
>>> shmat:=pointer(do_syscall(syscall_nr_SHMAT,TSysParam(shmid),TSysParam(shmaddr),TSysParam(shmflg)));
>>>      
>>>
>
>Can anybody who understand the patch, apply it ;)? Does ir work for i386
>too?
>  
>
the ipc unit for i386-linux includes ipccall.inc instead of ipcsys.inc, 
so this doesn't affect i386 at all.



More information about the fpc-devel mailing list