diff --git a/Lib/System/IdCTypes.pas b/Lib/System/IdCTypes.pas index 5d8623c9d..906df7d07 100644 --- a/Lib/System/IdCTypes.pas +++ b/Lib/System/IdCTypes.pas @@ -296,6 +296,16 @@ 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; @@ -303,3 +313,5 @@ TIdC_TM = record implementation end. + +