Bug#1091286: xsok: FTBFS on armhf: showscore.c:75:15: error: passing argument 1 of ‘ctime’ from incompatible pointer type [-Wincompatible-pointer-types]
Patrice Duroux <[email protected]> Wed, 15 Jan 2025 21:06:05 +0100
| Newsgroups | gmane.linux.debian.devel.bugs.general,gmane.linux.debian.devel.games |
|---|---|
| Message-ID | <CAGKjw9+XqWEHVcAq0MJZZhVp=WAr_sahxXwiOJ10LnaBzGfmqg@mail.gmail.com> |
Le mer. 15 janv. 2025 à 20:59, Patrice Duroux <[email protected]> a écrit : > > Source: xsok > Followup-For: Bug #1091286 > Control: tags -1 patch ftbfs > > Hi, > > I made the attached small fix very simple to resolve the compilation error. > But how do I test that it works correctly at runtime? > The data array p[] is long integers and this represents data read from a > file and I did not check how the data are coded when writing file content. > My architecture is amd64 and is there a (Debian) tool/command to easily create > an emulation environment to test the generated armhf package? > > Thanks, > Patrice
time64.patch
(text/x-patch, 722 B)
diff --git a/debian/patches/series b/debian/patches/series index 9c529de..ea31b90 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,3 +9,4 @@ no_gunzip.patch security_paranoia.patch do-not-use-global-variable-as-counter.patch rootless.patch +time64.patch diff --git a/debian/patches/time64.patch b/debian/patches/time64.patch new file mode 100644 index 0000000..4f1d637 --- /dev/null +++ b/debian/patches/time64.patch @@ -0,0 +1,11 @@ +--- a/src/showscore.c ++++ b/src/showscore.c +@@ -72,7 +72,7 @@ + filename = strrchr(filename, '/') + 1; + ReadHighscores(filename); + +- z = ctime(&p[4]); ++ z = ctime((const time_t *) &p[4]); + if (strchr(z, '\n')) + *strchr(z, '\n') = '\0'; +