Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Lib/System/IdCTypes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,22 @@ TIdC_TM = record
tm_wday: TIdC_INT; (* day of the week, range 0 to 6 *)
tm_yday: TIdC_INT; (* day in the year, range 0 to 365 *)
tm_isdst: TIdC_INT; (* daylight saving time *)
{$IFDEF LINUX}
// xjikka 20260112 glibc struct tm extension:
// ASN1_TIME_to_tm() writes a full glibc struct tm (tm_gmtoff, tm_zone).
// Without these fields TIdC_TM is too small, causing stack corruption
// (e.g. invalid X509 ValidFrom/ValidTo values) on Linux targets.
// This is especially visible with FPC cross-compilation to Linux/ARM
// (e.g. Raspberry Pi), where X509 ValidFrom/ValidTo values become invalid.
tm_gmtoff: TIdC_LONG; // seconds east of UTC
tm_zone: PAnsiChar; // timezone abbreviation
{$ENDIF}
end;
PIdC_TM = ^TIdC_TM;
PPIdC_TM = ^PIdC_TM;

implementation

end.