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
67
67
fpWrite(terminatePipeOut, ch, 1 );
68
68
end ;
69
69
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
+
70
79
(* !-----------------------------------------------
71
80
* install signal handler
72
81
*-------------------------------------------------
@@ -77,7 +86,11 @@ implementation
77
86
begin
78
87
fillChar(newAct, sizeOf(SigactionRec), #0 );
79
88
fillChar(oldAct, sizeOf(Sigactionrec), #0 );
89
+ { $IF FPC_FULLVERSION <= 30004}
90
+ newAct.sa_handler := @__doTerminate;
91
+ { $ELSE}
80
92
newAct.sa_handler := @TSigTerm.doTerminate;
93
+ { $ENDIF}
81
94
fpSigaction(aSig, @newAct, @oldAct);
82
95
end ;
83
96
Original file line number Diff line number Diff line change @@ -77,7 +77,12 @@ implementation
77
77
*--------------------------------------------*)
78
78
function TNullRouteArgs.getArgs () : TArrayOfPlaceholders;
79
79
begin
80
- result := [];
80
+ // bugfix for FPC 3.0.4
81
+ { $IF FPC_FULLVERSION > 30004}
82
+ result := [];
83
+ { $ELSE}
84
+ result := nil ;
85
+ { $ENDIF}
81
86
end ;
82
87
83
88
(* !-------------------------------------------
You can’t perform that action at this time.
0 commit comments