diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-17 03:12:49 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-17 03:12:49 +0000 |
commit | 14c111e04185dbe50ec5ecdc8f11fc49e602c727 (patch) | |
tree | 8c169e0943f5acbf90c329ddbc7b463bb03411c6 /games-misc | |
parent | changed maintainer (diff) | |
download | gentoo-2-14c111e04185dbe50ec5ecdc8f11fc49e602c727.tar.gz gentoo-2-14c111e04185dbe50ec5ecdc8f11fc49e602c727.tar.bz2 gentoo-2-14c111e04185dbe50ec5ecdc8f11fc49e602c727.zip |
Fix 64bit issue with utmp structure #102667 by Bruno Lustosa.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'games-misc')
-rw-r--r-- | games-misc/bsd-games/ChangeLog | 7 | ||||
-rw-r--r-- | games-misc/bsd-games/bsd-games-2.17.ebuild | 4 | ||||
-rw-r--r-- | games-misc/bsd-games/files/2.17-64bit.patch | 21 | ||||
-rw-r--r-- | games-misc/bsd-games/files/bsd-games-2.17-64bit.patch | 43 |
4 files changed, 51 insertions, 24 deletions
diff --git a/games-misc/bsd-games/ChangeLog b/games-misc/bsd-games/ChangeLog index b7235c24cb8c..5f07e17919c3 100644 --- a/games-misc/bsd-games/ChangeLog +++ b/games-misc/bsd-games/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-misc/bsd-games # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-misc/bsd-games/ChangeLog,v 1.15 2005/08/17 02:58:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-misc/bsd-games/ChangeLog,v 1.16 2005/08/17 03:12:49 vapier Exp $ + + 17 Aug 2005; Mike Frysinger <vapier@gentoo.org> + +files/bsd-games-2.17-64bit.patch, -files/2.17-64bit.patch, + bsd-games-2.17.ebuild: + Fix 64bit issue with utmp structure #102667 by Bruno Lustosa. 17 Aug 2005; Mike Frysinger <vapier@gentoo.org> bsd-games-2.17.ebuild: Remove fortune from the default build list since we already have a fortune diff --git a/games-misc/bsd-games/bsd-games-2.17.ebuild b/games-misc/bsd-games/bsd-games-2.17.ebuild index 193d2c124d17..ecc5e6a85f16 100644 --- a/games-misc/bsd-games/bsd-games-2.17.ebuild +++ b/games-misc/bsd-games/bsd-games-2.17.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-misc/bsd-games/bsd-games-2.17.ebuild,v 1.3 2005/08/17 02:58:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-misc/bsd-games/bsd-games-2.17.ebuild,v 1.4 2005/08/17 03:12:49 vapier Exp $ inherit eutils games @@ -35,7 +35,7 @@ src_unpack() { cd "${S}" epatch \ "${DISTDIR}/bsdgames_${PV}-2.diff.gz" \ - "${FILESDIR}"/${PV}-64bit.patch \ + "${FILESDIR}"/${P}-64bit.patch \ "${FILESDIR}"/${P}-gcc4.patch sed -i \ diff --git a/games-misc/bsd-games/files/2.17-64bit.patch b/games-misc/bsd-games/files/2.17-64bit.patch deleted file mode 100644 index 1457c7ef5413..000000000000 --- a/games-misc/bsd-games/files/2.17-64bit.patch +++ /dev/null @@ -1,21 +0,0 @@ -David Leverton writes: - -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 - ---- bsd-games-2.13/adventure/crc.c~ 1999-04-04 12:49:03.000000000 +0100 -+++ bsd-games-2.13/adventure/crc.c 2005-01-07 02:42:07.027698064 +0000 -@@ -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; - } diff --git a/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch b/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch new file mode 100644 index 000000000000..a56ea8454bc4 --- /dev/null +++ b/games-misc/bsd-games/files/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 |