From 0c240aa9a220b348a623e60e1fca114fdb89738b Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Tue, 24 Dec 2024 16:17:30 +0000 Subject: [PATCH] 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 --- ...fix-incompatible-pointer-type-errors.patch | 20 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 21 insertions(+) create mode 100644 debian/patches/06-fix-incompatible-pointer-type-errors.patch diff --git a/debian/patches/06-fix-incompatible-pointer-type-errors.patch b/debian/patches/06-fix-incompatible-pointer-type-errors.patch new file mode 100644 index 0000000..86e7521 --- /dev/null +++ b/debian/patches/06-fix-incompatible-pointer-type-errors.patch @@ -0,0 +1,20 @@ +Author: Jeremy Sowden +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(); + + diff --git a/debian/patches/series b/debian/patches/series index 1e030c2..097caeb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 03-manapge-30hr-patch.patch 04-makefile-modifications.patch 05-fix-ftbfs.patch +06-fix-incompatible-pointer-type-errors.patch