Fix syscall unit compilation for i386-linux using -dFPC_USE_LIBC

This commit is contained in:
Pierre Muller 2024-01-06 14:33:42 +01:00
parent 48c27aea1e
commit 7c9cf75418
3 changed files with 6 additions and 5 deletions

View File

@ -45,6 +45,7 @@ type
var
psysinfo: LongWord = 0;
sysenter_supported : longint = 0;
procedure InitSyscallIntf;
var

View File

@ -77,11 +77,6 @@ property cmdline:PAnsiChar read get_cmdline;
implementation
{*****************************************************************************}
{$if defined(CPUI386) and not defined(FPC_USE_LIBC)}
var
sysenter_supported: LongInt = 0;
{$endif}
const
calculated_cmdline:PAnsiChar=nil;
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}

View File

@ -34,5 +34,10 @@ procedure seterrno(err:cint); external name 'FPC_SYS_SETERRNO';
{$ifdef FPC_HAS_SETSYSNR_INC}
begin
SetSyscallNumbers;
{$else}
{$if defined(linux) and defined(i386) and defined(FPC_USE_LIBC)}
begin
InitSyscallIntf;
{$endif}
{$endif FPC_HAS_SETSYSNR_INC}
end.