1 David Leverton writes about adventure/crc.c:
3 The 'adventure' game from the games-misc/bsd-games-2.13 package crashes
4 when saving the game on AMD64 (and probably other 64-bit systems, but I
5 haven't checked). Find attached to fix this.
7 http://bugs.gentoo.org/show_bug.cgi?id=77032
12 the utmpx structure defines the ut_tv member a little differently on
13 64bit hosts so that a 32bit and 64bit structure can be shared. So the
14 ut_tv is a custom 32bit structure rather than the native 64bit timeval
15 structure. Work around is to assign the submembers instead.
17 http://bugs.gentoo.org/show_bug.cgi?id=102667
19 --- bsd-games/adventure/crc.c
20 +++ bsd-games/adventure/crc.c
22 if (step >= sizeof(crctab) / sizeof(crctab[0]))
25 - crcval = (crcval << 8) ^ crctab[i];
26 + /* Mask to 32 bits. */
27 + crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff;
29 - return crcval & 0xffffffff; /* Mask to 32 bits. */
32 --- bsd-games/dm/utmpentry.c
33 +++ bsd-games/dm/utmpentry.c
35 e->line[sizeof(e->line) - 1] = '\0';
36 (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
37 e->name[sizeof(e->host) - 1] = '\0';
39 + e->tv.tv_sec = up->ut_tv.tv_sec;
40 + e->tv.tv_usec = up->ut_tv.tv_usec;