File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,15 @@ implementation
6767 fpWrite(terminatePipeOut, ch, 1 );
6868 end ;
6969
70+ { $IF FPC_FULLVERSION <= 30004}
71+ // workaround for bug 27414 in FPC 3.0.4
72+ // https://gitlab.com/freepascal.org/fpc/source/-/issues/27414
73+ procedure __doTerminate (sig : longint; info : PSigInfo; ctx : PSigContext); cdecl;
74+ begin
75+ TSigTerm.doTerminate(sig, info, ctx);
76+ end ;
77+ { $ENDIF}
78+
7079 (* !-----------------------------------------------
7180 * install signal handler
7281 *-------------------------------------------------
@@ -77,7 +86,11 @@ implementation
7786 begin
7887 fillChar(newAct, sizeOf(SigactionRec), #0 );
7988 fillChar(oldAct, sizeOf(Sigactionrec), #0 );
89+ { $IF FPC_FULLVERSION <= 30004}
90+ newAct.sa_handler := @__doTerminate;
91+ { $ELSE}
8092 newAct.sa_handler := @TSigTerm.doTerminate;
93+ { $ENDIF}
8194 fpSigaction(aSig, @newAct, @oldAct);
8295 end ;
8396
Original file line number Diff line number Diff line change @@ -77,7 +77,12 @@ implementation
7777 *--------------------------------------------*)
7878 function TNullRouteArgs.getArgs () : TArrayOfPlaceholders;
7979 begin
80- result := [];
80+ // bugfix for FPC 3.0.4
81+ { $IF FPC_FULLVERSION > 30004}
82+ result := [];
83+ { $ELSE}
84+ result := nil ;
85+ { $ENDIF}
8186 end ;
8287
8388 (* !-------------------------------------------
You can’t perform that action at this time.
0 commit comments