diff --git a/rtl/linux/linux.pp b/rtl/linux/linux.pp index 9a7627b5b1..4d04ae3fa6 100644 --- a/rtl/linux/linux.pp +++ b/rtl/linux/linux.pp @@ -106,6 +106,10 @@ function futex_op(op, oparg, cmp, cmparg: cint): cint; {$ifdef SYSTEMINLINE}inli {$endif} const + POLLMSG = $0400; + POLLREMOVE = $1000; + POLLRDHUP = $2000; + EPOLLIN = $01; { The associated file is available for read(2) operations. } EPOLLPRI = $02; { There is urgent data available for read(2) operations. } EPOLLOUT = $04; { The associated file is available for write(2) operations. } @@ -326,6 +330,7 @@ const SYNC_FILE_RANGE_WAIT_AFTER = 4; function sync_file_range(fd: cInt; offset, nbytes: off64_t; flags: cuInt): cInt; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF} +function fdatasync (fd: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF} implementation @@ -487,6 +492,11 @@ begin {$endif} end; +function fdatasync (fd: cint): cint; +begin + fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd); +end; + {$endif} // non-libc { FUTEX_OP is a macro, doesn't exist in libC as function} diff --git a/rtl/linux/unxsysc.inc b/rtl/linux/unxsysc.inc index 536aee924f..a998c90444 100644 --- a/rtl/linux/unxsysc.inc +++ b/rtl/linux/unxsysc.inc @@ -29,11 +29,6 @@ begin fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info)) end; -Function fpfdatasync (fd : cint) : cint; -begin - fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd); -end; - Function fpfsync (fd : cint) : cint; begin diff --git a/rtl/linux/unxsysch.inc b/rtl/linux/unxsysch.inc index f1e7cb1184..c708c5437f 100644 --- a/rtl/linux/unxsysch.inc +++ b/rtl/linux/unxsysch.inc @@ -18,7 +18,6 @@ function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; external name 'FPC_SYS function fpfStatFS (Fd: cint; Info:pstatfs):cint; function fpStatFS (Path:pchar; Info:pstatfs):cint; function fpfsync (fd : cint) : cint; -function fpfdatasync (fd : cint) : cint; Function fpFlock (fd,mode : cint) : cint ;