summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/bsd-games-2.17-64bit.patch
diff options
context:
space:
mode:
authorVitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>2020-04-24 20:18:31 +0700
committerGuix Patches Tester <>2020-04-24 15:09:16 +0100
commit55aceef934b8e8165e1653e9fbf80604fda72b65 (patch)
tree5ad3587ba26025a36662fe8ff572d0142cda00f4 /gnu/packages/patches/bsd-games-2.17-64bit.patch
parent4ac3461a80338c9596b938b25d6f517af43330f0 (diff)
downloadguix-patches-55aceef934b8e8165e1653e9fbf80604fda72b65.tar
guix-patches-55aceef934b8e8165e1653e9fbf80604fda72b65.tar.gz
gnu: Add bsd-games.
* gnu/packages/games.scm (bsd-games): a new variable. New patches, taken from Arch and Debian: * gnu/packages/patches/bsd-games-2.17-64bit.patch * gnu/packages/patches/bsd-games-bad-ntohl-cast.patch * gnu/packages/patches/bsd-games-fix-number-test.patch * gnu/packages/patches/bsd-games-gamescreen.h.patch * gnu/packages/patches/bsd-games-getline.patch * gnu/packages/patches/bsd-games-null-check.patch * gnu/packages/patches/bsd-games-number.c.patch * gnu/packages/patches/bsd-games-stdio.h.patch New patches: * gnu/packages/patches/bsd-games-add-configure-config.patch * gnu/packages/patches/bsd-games-add-word-list.patch * gnu/packages/patches/bsd-games-add-wrapper.patch * gnu/packages/patches/bsd-games-dont-install-empty-files.patch * gnu/packages/patches/bsd-games-use-anthology-style-naming.patch
Diffstat (limited to 'gnu/packages/patches/bsd-games-2.17-64bit.patch')
-rw-r--r--gnu/packages/patches/bsd-games-2.17-64bit.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/bsd-games-2.17-64bit.patch b/gnu/packages/patches/bsd-games-2.17-64bit.patch
new file mode 100644
index 0000000000..a56ea8454b
--- /dev/null
+++ b/gnu/packages/patches/bsd-games-2.17-64bit.patch
@@ -0,0 +1,43 @@
+David Leverton writes about adventure/crc.c:
+
+The 'adventure' game from the games-misc/bsd-games-2.13 package crashes
+when saving the game on AMD64 (and probably other 64-bit systems, but I
+haven't checked). Find attached to fix this.
+
+http://bugs.gentoo.org/show_bug.cgi?id=77032
+
+
+About utmpentry.c:
+
+the utmpx structure defines the ut_tv member a little differently on
+64bit hosts so that a 32bit and 64bit structure can be shared. So the
+ut_tv is a custom 32bit structure rather than the native 64bit timeval
+structure. Work around is to assign the submembers instead.
+
+http://bugs.gentoo.org/show_bug.cgi?id=102667
+
+--- bsd-games/adventure/crc.c
++++ bsd-games/adventure/crc.c
+@@ -134,7 +134,8 @@
+ if (step >= sizeof(crctab) / sizeof(crctab[0]))
+ step = 0;
+ }
+- crcval = (crcval << 8) ^ crctab[i];
++ /* Mask to 32 bits. */
++ crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff;
+ }
+- return crcval & 0xffffffff; /* Mask to 32 bits. */
++ return crcval;
+ }
+--- bsd-games/dm/utmpentry.c
++++ bsd-games/dm/utmpentry.c
+@@ -291,7 +291,8 @@
+ e->line[sizeof(e->line) - 1] = '\0';
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
+ e->name[sizeof(e->host) - 1] = '\0';
+- e->tv = up->ut_tv;
++ e->tv.tv_sec = up->ut_tv.tv_sec;
++ e->tv.tv_usec = up->ut_tv.tv_usec;
+ adjust_size(e);
+ }
+ #endif