mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 11:28:06 +02:00
* Fix getdirentries problem for openbsd
git-svn-id: trunk@19418 -
This commit is contained in:
parent
a5cff8099c
commit
a6280de177
@ -223,9 +223,13 @@ with blockmode have this higher?}
|
||||
function readbuffer:longint;
|
||||
|
||||
var retval :longint;
|
||||
|
||||
basep : clong;
|
||||
begin
|
||||
{$ifdef USE_GETDIRENTRIES_SYSCALL}
|
||||
Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(@basep));
|
||||
{$else not USE_GETDIRENTRIES_SYSCALL}
|
||||
Retval:=do_syscall(syscall_nr_getdents,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)});
|
||||
{$endif not USE_GETDIRENTRIES_SYSCALL}
|
||||
dirp^.dd_rewind:=TSysParam(dirp^.dd_buf);
|
||||
if retval=0 then
|
||||
begin
|
||||
|
@ -251,5 +251,6 @@ Const
|
||||
|
||||
{ Aliases }
|
||||
syscall_nr_waitpid = syscall_nr_wait4; // 7, added: ease of notation purposes
|
||||
syscall_nr_getdents = syscall_nr_getdirentries;
|
||||
{ syscall_nr_getdents = syscall_nr_getdirentries; }
|
||||
{$define USE_GETDIRENTRIES_SYSCALL}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user