mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 18:49:10 +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
|
begin
|
||||||
{$if sizeof(TSysParam)>=sizeof(off_t)}
|
{$if sizeof(TSysParam)>=sizeof(off_t)}
|
||||||
Fpmmap:= pointer(do_syscall(syscall_nr_mmap2,TSysParam(adr),TSysParam(len),
|
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 }
|
{$else off_t is larger than TsysParam }
|
||||||
{$message warning need mmap64 syscall, hi(off) not used}
|
{$message warning need mmap64 syscall, hi(off) not used}
|
||||||
Fpmmap:= pointer(do_syscall(syscall_nr_mmap2,TSysParam(adr),TSysParam(len),
|
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}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
{$else MMAP2}
|
{$else MMAP2}
|
||||||
|
Loading…
Reference in New Issue
Block a user