diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-01-22 11:03:23 +0100 |
|---|---|---|
| committer | Ross Burton <ross.burton@arm.com> | 2025-01-23 11:56:47 +0000 |
| commit | fc1a20c7071db1807afe81b78511e5297160b6e4 (patch) | |
| tree | f34e8d2a87055404cd390f1cbd9e1f5c9c7c09f6 | |
| parent | b89a5dbebdd1ff845cc89ba00667b87f685f4049 (diff) | |
| download | poky-fc1a20c7071db1807afe81b78511e5297160b6e4.tar.gz | |
tcl8: add a patch to address Y2038 issues (tcl 9.x doesn't need it)
(From OE-Core rev: 50731c5233f1531b1a7a9ac94c08235e06be8c2d)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
| -rw-r--r-- | meta/recipes-devtools/tcltk8/tcl8/0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch | 33 | ||||
| -rw-r--r-- | meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk8/tcl8/0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch b/meta/recipes-devtools/tcltk8/tcl8/0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch new file mode 100644 index 0000000000..1859992838 --- /dev/null +++ b/meta/recipes-devtools/tcltk8/tcl8/0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From ff508f2e6786df697876140f21855ecb92a3ed36 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex@linutronix.de> | ||
| 3 | Date: Fri, 18 Aug 2023 12:25:11 +0200 | ||
| 4 | Subject: [PATCH] generic/tcl.h: use Tcl_WideInt for seconds in Tcl_Time | ||
| 5 | |||
| 6 | This ensures the value will not overflow, particularly on 32 bit systems | ||
| 7 | in 2038, where long will. | ||
| 8 | |||
| 9 | This patch was proposed at https://core.tcl-lang.org/tcl/tktview/86dd172271 | ||
| 10 | Upstream was generally supportive of the fix, but they merged a much more | ||
| 11 | elaborate version of it for tcl 9.x (released in 9.0.0), and declined | ||
| 12 | to merge it into 8.x due to ABI breakage (sadly this change is in a public header). | ||
| 13 | But we can carry the fix downstream. | ||
| 14 | |||
| 15 | Upstream-Status: Inappropriate [see above] | ||
| 16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 17 | --- | ||
| 18 | generic/tcl.h | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/generic/tcl.h b/generic/tcl.h | ||
| 22 | index 3a4622e..6204c57 100644 | ||
| 23 | --- a/generic/tcl.h | ||
| 24 | +++ b/generic/tcl.h | ||
| 25 | @@ -1418,7 +1418,7 @@ typedef enum { | ||
| 26 | */ | ||
| 27 | |||
| 28 | typedef struct Tcl_Time { | ||
| 29 | - long sec; /* Seconds. */ | ||
| 30 | + Tcl_WideInt sec; /* Seconds. */ | ||
| 31 | long usec; /* Microseconds. */ | ||
| 32 | } Tcl_Time; | ||
| 33 | |||
diff --git a/meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb b/meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb index c8f4b5df2a..076bbc906c 100644 --- a/meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb +++ b/meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb | |||
| @@ -23,6 +23,7 @@ SRC_URI = "${BASE_SRC_URI} \ | |||
| 23 | file://alter-includedir.patch \ | 23 | file://alter-includedir.patch \ |
| 24 | file://interp.patch \ | 24 | file://interp.patch \ |
| 25 | file://run-ptest \ | 25 | file://run-ptest \ |
| 26 | file://0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch \ | ||
| 26 | " | 27 | " |
| 27 | SRC_URI[sha256sum] = "3b371386a9a928eecdbf263bcab7d6a531e620ca3fbab4fdeeb3d6a9a56f38e9" | 28 | SRC_URI[sha256sum] = "3b371386a9a928eecdbf263bcab7d6a531e620ca3fbab4fdeeb3d6a9a56f38e9" |
| 28 | 29 | ||
