Bug#1085214: xpenguins FTBFS on 32-bit with 64-bit time_t with gcc 14

Adrian Bunk bunk at debian.org
Wed Oct 16 17:42:32 BST 2024


Source: xpenguins
Version: 3.2.1-2
Severity: serious
Tags: ftbfs patch
X-Debbugs-Cc: Alexandre Detiste <tchet at debian.org>

https://tests.reproducible-builds.org/debian/rb-pkg/trixie/armhf/xpenguins.html
https://buildd.debian.org/status/logs.php?pkg=xpenguins&ver=3.2.3-1

...
xpenguins_core.c: In function ‘xpenguins_start’:
xpenguins_core.c:155:18: error: passing argument 1 of ‘time’ from incompatible pointer type [-Wincompatible-pointer-types]
  155 |       srand(time((long *) NULL));  // superfluous
      |                  ^
      |                  |
      |                  long int *
In file included from /usr/include/features.h:510,
                 from /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from xpenguins_core.c:21:
/usr/include/time.h:85:15: note: expected ‘time_t *’ {aka ‘long long int *’} but argument is of type ‘long int *’
   85 | extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
      |               ^~~~~~~~~~~~~~
make[3]: *** [Makefile:513: xpenguins-xpenguins_core.o] Error 1



The fix is attached.
-------------- next part --------------
Description: Fix FTBFS on 32-bit with 64-bit time_t with gcc 14
Author: Adrian Bunk <bunk at debian.org>

--- xpenguins-3.2.3.orig/src/xpenguins_core.c
+++ xpenguins-3.2.3/src/xpenguins_core.c
@@ -152,7 +152,7 @@ char *xpenguins_start(char *display_name
       unsigned long configure_mask = TOON_SIDEBOTTOMBLOCK;
 
       /* reset random-number generator */
-      srand(time((long *) NULL));  // superfluous
+      srand(time((time_t *) NULL));  // superfluous
       if (!ToonOpenDisplay(display_name)) {
 	 return toon_error_message;
       }


More information about the Pkg-games-devel mailing list