unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob a56ea8454bc478f5f3036598412037de10e50e31 1322 bytes (raw)
name: gnu/packages/patches/bsd-games-2.17-64bit.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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

debug log:

solving a56ea8454b ...
found a56ea8454b in https://yhetil.org/guix-patches/mI4iG8ZhDza81on0BxLDj7FnB_WzIfzcky6EG-5QYoRJLEPuYAdV4tZfhlts5in5dAa0mhfl6NEaCWIp1L7QrMRzFRBRF3K9vkshTrugYK8=@protonmail.com/ ||
	https://yhetil.org/guix-patches/_PWhYxkw6OfHG67OjoQ_rXEbyw4zBvKV_awdd7pY-rDTnqBXtu_CvLiwr_eyPeF4cmqYRVkKYYfBQH-5ilv10F7igF9d40wsozcOAdLfeVs=@protonmail.com/ ||
	https://yhetil.org/guix-patches/ff2iu2bW1tBFrGN2L7u6kGsUl3_b0Iohk-KEjwDYVftqfTeGuRnUgclM3VEquudkczw_67OLLuUkHG7bknJiV0-b0P64FCAF9zWCK7WO-3w=@protonmail.com/

applying [1/1] https://yhetil.org/guix-patches/mI4iG8ZhDza81on0BxLDj7FnB_WzIfzcky6EG-5QYoRJLEPuYAdV4tZfhlts5in5dAa0mhfl6NEaCWIp1L7QrMRzFRBRF3K9vkshTrugYK8=@protonmail.com/
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

1:9: trailing whitespace.
The 'adventure' game from the games-misc/bsd-games-2.13 package crashes 
1:10: trailing whitespace.
when saving the game on AMD64 (and probably other 64-bit systems, but I 
1:18: trailing whitespace.
the utmpx structure defines the ut_tv member a little differently on 
1:19: trailing whitespace.
64bit hosts so that a 32bit and 64bit structure can be shared.  So the 
1:20: trailing whitespace.
ut_tv is a custom 32bit structure rather than the native 64bit timeval 
Checking patch gnu/packages/patches/bsd-games-2.17-64bit.patch...
Applied patch gnu/packages/patches/bsd-games-2.17-64bit.patch cleanly.
warning: squelched 8 whitespace errors
warning: 13 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/_PWhYxkw6OfHG67OjoQ_rXEbyw4zBvKV_awdd7pY-rDTnqBXtu_CvLiwr_eyPeF4cmqYRVkKYYfBQH-5ilv10F7igF9d40wsozcOAdLfeVs=@protonmail.com/ for a56ea8454b
skipping https://yhetil.org/guix-patches/ff2iu2bW1tBFrGN2L7u6kGsUl3_b0Iohk-KEjwDYVftqfTeGuRnUgclM3VEquudkczw_67OLLuUkHG7bknJiV0-b0P64FCAF9zWCK7WO-3w=@protonmail.com/ for a56ea8454b
index at:
100644 a56ea8454bc478f5f3036598412037de10e50e31	gnu/packages/patches/bsd-games-2.17-64bit.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).