From 72a0dfecf0c5226c89cc478e8b18d4a966bf2f55 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 15 Oct 2014 23:27:59 +0000 Subject: [PATCH] Add code to includee new file to handle changing openbsd syscall numbers git-svn-id: trunk@28830 - --- rtl/bsd/system.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rtl/bsd/system.pp b/rtl/bsd/system.pp index 634b2fbfe4..8f17e5c559 100644 --- a/rtl/bsd/system.pp +++ b/rtl/bsd/system.pp @@ -79,6 +79,10 @@ Implementation {$I system.inc} +{$ifdef FPC_HAS_SETSYSNR_INC} +{$I setsysnr.inc} +{$endif FPC_HAS_SETSYSNR_INC} + {***************************************************************************** Misc. System Dependent Functions *****************************************************************************} @@ -301,7 +305,7 @@ begin argv:= argvparam; envp:= envpparam; {$ifdef cpui386} - Set8087CW(Default8087CW); + Set8087CW(Default8087CW); {$endif cpui386} pascalmain; {run the pascal main program} end; @@ -327,6 +331,11 @@ Begin IsConsole := TRUE; StackLength := CheckInitialStkLen(InitialStkLen); StackBottom := Sptr - StackLength; +{$ifdef FPC_HAS_SETSYSNR_INC} + { This procedure is needed for openbsd system which re-uses + the same syscall numbers depending on OS version } + SetSyscallNumbers; +{$endif FPC_HAS_SETSYSNR_INC} { Set up signals handlers (may be needed by init code to test cpu features) } InstallSignals;