* linux: FileGetDate makes use of statx if needed

git-svn-id: trunk@48476 -
This commit is contained in:
florian 2021-01-31 18:38:50 +00:00
parent ef04e3983f
commit 90ba89a128

View File

@ -1077,14 +1077,22 @@ End;
Function FileGetDate (Handle : Longint) : Int64;
Var Info : Stat;
Var
Info : Stat;
{$ifdef USE_STATX}
Infox : Statx;
{$endif USE_STATX}
begin
If (fpFStat(Handle,Info))<0 then
Result:=-1
else
Result:=Info.st_Mtime;
Result:=-1;
{$ifdef USE_STATX}
if Fpstatx(Handle,nil,0,STATX_MTIME,Infox)=0 then
Result:=Infox.stx_Mtime.tv_sec
else if fpgeterrno=ESysENOSYS then
{$endif USE_STATX}
begin
If fpFStat(Handle,Info)=0 then
Result:=Info.st_Mtime;
end;
end;