mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:29:28 +02:00
* mmap2 expects that offset is divided by 4096
git-svn-id: trunk@44198 -
This commit is contained in:
parent
27e89e07a3
commit
17158c3587
@ -583,11 +583,11 @@ end;
|
||||
begin
|
||||
{$if sizeof(TSysParam)>=sizeof(off_t)}
|
||||
Fpmmap:= pointer(do_syscall(syscall_nr_mmap2,TSysParam(adr),TSysParam(len),
|
||||
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(off)));
|
||||
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(off div 4096)));
|
||||
{$else off_t is larger than TsysParam }
|
||||
{$message warning need mmap64 syscall, hi(off) not used}
|
||||
Fpmmap:= pointer(do_syscall(syscall_nr_mmap2,TSysParam(adr),TSysParam(len),
|
||||
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(lo(off))));
|
||||
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(lo(off div 4096))));
|
||||
{$endif}
|
||||
end;
|
||||
{$else MMAP2}
|
||||
|
Loading…
Reference in New Issue
Block a user