d/patches: add patch to fix type of arguments to gmtime(3) and localtime(3)

With recent versions of gcc, on architectures where `long` and `time_t` are not
the same size, passing pointers to `long` to `gmtime(3)` and `localtime(3)`,
leads to "incompatible pointer type" errors.  Use `time_t` instead.

Closes: #1091253

Signed-off-by: Jeremy Sowden <azazel@debian.org>
This commit is contained in:
Jeremy Sowden
2024-12-24 16:17:30 +00:00
parent f88b9b48e1
commit 0c240aa9a2
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
Author: Jeremy Sowden <azazel@debian.org>
Last-Update: 2024-12-24
Description: fix type of arguments to `gmtime(3)` and `localtime(3)`
With recent versions of gcc, on architectures where `long` and `time_t` are not
the same size, passing pointers to `long` to `gmtime(3)` and `localtime(3)`,
leads to "incompatible pointer type" errors. Use `time_t` instead.
Bug-Debian: https://bugs.debian.org/1091253
Forwarded: https://groups.google.com/g/wmaker-dev/c/WO4eE63SCEo
--- a/Src/wmCalClock.c
+++ b/Src/wmCalClock.c
@@ -300,7 +300,7 @@
int i, n, wid, extrady, extradx;
int Year, Month, DayOfWeek, DayOfMonth, OldDayOfMonth;
int Hours, Mins, Secs, OldSecs, digit, xoff, D[10], xsize;
- long CurrentLocalTime;
+ time_t CurrentLocalTime;
double UT, TU, TU2, TU3, T0, gmst, jd(), hour24();

View File

@ -4,3 +4,4 @@
03-manapge-30hr-patch.patch
04-makefile-modifications.patch
05-fix-ftbfs.patch
06-fix-incompatible-pointer-type-errors.patch