diff --git a/rtl/bsd/ossysc.inc b/rtl/bsd/ossysc.inc index 32e62e0ce8..ce09c3da0e 100644 --- a/rtl/bsd/ossysc.inc +++ b/rtl/bsd/ossysc.inc @@ -223,7 +223,12 @@ with blockmode have this higher?} function readbuffer:longint; var retval :longint; +{$ifdef USE_GETDIRENTRIES_I49_SYSCALL} + { OpenBSD i49 getDirEntries system call uses off_t type for last parameter } + basep : off_t; +{$else not USE_GETDIRENTRIES_I49_SYSCALL} basep : clong; +{$endif not USE_GETDIRENTRIES_I49_SYSCALL} begin {$ifdef USE_GETDIRENTRIES_SYSCALL} Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(@basep)); diff --git a/rtl/openbsd/sysnr.inc b/rtl/openbsd/sysnr.inc index 96782cd5c1..0fca0a28fd 100644 --- a/rtl/openbsd/sysnr.inc +++ b/rtl/openbsd/sysnr.inc @@ -256,8 +256,9 @@ Const syscall_nr_MAXSYSCALL = 313; { Aliases } - syscall_nr_getdirentries = syscall_nr_ogetdirentries; + syscall_nr_getdirentries = syscall_nr_getdirentriesi49; syscall_nr_waitpid = syscall_nr_wait4; // 7, added: ease of notation purposes { syscall_nr_getdents = syscall_nr_getdirentries; } {$define USE_GETDIRENTRIES_SYSCALL} +{$define USE_GETDIRENTRIES_I49_SYSCALL}