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:
20
debian/patches/06-fix-incompatible-pointer-type-errors.patch
vendored
Normal file
20
debian/patches/06-fix-incompatible-pointer-type-errors.patch
vendored
Normal 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();
|
||||||
|
|
||||||
|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -4,3 +4,4 @@
|
|||||||
03-manapge-30hr-patch.patch
|
03-manapge-30hr-patch.patch
|
||||||
04-makefile-modifications.patch
|
04-makefile-modifications.patch
|
||||||
05-fix-ftbfs.patch
|
05-fix-ftbfs.patch
|
||||||
|
06-fix-incompatible-pointer-type-errors.patch
|
||||||
|
Reference in New Issue
Block a user