From 7457a0f321efee915a31b5c9ad2415846679f84a Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 26 Dec 2012 14:33:30 +0000 Subject: [PATCH] Use new getdirentriesi49 syscall, contributed by Pascal Stumpf git-svn-id: trunk@23223 - --- rtl/bsd/ossysc.inc | 5 +++++ rtl/openbsd/sysnr.inc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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}