diff options
author | joerg <joerg@pkgsrc.org> | 2009-08-03 13:18:37 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-08-03 13:18:37 +0000 |
commit | 1d9f47d713f6dafa667d17d1667a6bc2a0b541a0 (patch) | |
tree | 9b2051fb39f9340767e2d9f053b8f7d99ed47919 /games/crafty | |
parent | 7e919adec31e98f0727d3c7afcc7591827374f54 (diff) | |
download | pkgsrc-1d9f47d713f6dafa667d17d1667a6bc2a0b541a0.tar.gz |
Don't segfault on failing shmget because the print routine tries to
access the shared memory segment. Bump revision.
Diffstat (limited to 'games/crafty')
-rw-r--r-- | games/crafty/Makefile | 4 | ||||
-rw-r--r-- | games/crafty/distinfo | 4 | ||||
-rw-r--r-- | games/crafty/patches/patch-ad | 34 |
3 files changed, 34 insertions, 8 deletions
diff --git a/games/crafty/Makefile b/games/crafty/Makefile index a60429983c9..f5b40632fcc 100644 --- a/games/crafty/Makefile +++ b/games/crafty/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.43 2008/08/17 21:00:20 dholland Exp $ +# $NetBSD: Makefile,v 1.44 2009/08/03 13:18:37 joerg Exp $ DISTNAME= crafty-22.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= games MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/source/ \ http://www.craftychess.com/ diff --git a/games/crafty/distinfo b/games/crafty/distinfo index dec8a2614d1..c7ca63537ce 100644 --- a/games/crafty/distinfo +++ b/games/crafty/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.14 2008/08/17 21:00:20 dholland Exp $ +$NetBSD: distinfo,v 1.15 2009/08/03 13:18:37 joerg Exp $ SHA1 (crafty-22.1.zip) = 4ed19f5c676035b899d82cd254eee3d391cbabbf RMD160 (crafty-22.1.zip) = 963ec8110617b3d1273953d03ddb974019ec26a9 @@ -6,4 +6,4 @@ Size (crafty-22.1.zip) = 405169 bytes SHA1 (patch-aa) = 8efbb76aa23b3972c05dd41cde6b2c5ec8dc49b9 SHA1 (patch-ab) = 2b926a2ebd8f9ecf125d9f62c6d5f751a52d41a7 SHA1 (patch-ac) = 5ea68aa6ef3188ceeaf823be853e6f8c81e320df -SHA1 (patch-ad) = 8fff57e2a0df5c81b0c783f5e04b340dcd5b630a +SHA1 (patch-ad) = d52e3f523bd8a757095de927ebf28c2cfba7b333 diff --git a/games/crafty/patches/patch-ad b/games/crafty/patches/patch-ad index 30600a7e84f..1f3c0e8263e 100644 --- a/games/crafty/patches/patch-ad +++ b/games/crafty/patches/patch-ad @@ -1,8 +1,34 @@ -$NetBSD: patch-ad,v 1.3 2008/08/17 21:00:20 dholland Exp $ +$NetBSD: patch-ad,v 1.4 2009/08/03 13:18:37 joerg Exp $ ---- utility.c.orig 2008-04-15 18:41:49.000000000 -0400 -+++ utility.c 2008-08-17 16:41:20.000000000 -0400 -@@ -2788,6 +2788,15 @@ +--- utility.c.orig 2008-04-16 00:41:49.000000000 +0200 ++++ utility.c +@@ -388,8 +388,10 @@ void ClearHashTableScores(void) + */ + void CraftyExit(int exit_type) + { +- shared->abort_search = 1; +- shared->quit = 1; ++ if (shared) { ++ shared->abort_search = 1; ++ shared->quit = 1; ++ } + exit(exit_type); + } + +@@ -1541,10 +1543,10 @@ void Print(int vb, char *fmt, ...) + va_list ap; + + va_start(ap, fmt); +- if (vb & shared->display_options) ++ if (shared == NULL || (vb & shared->display_options)) + vprintf(fmt, ap); + fflush(stdout); +- if (shared->time_limit > 99 || shared->tc_time_remaining > 6000 || vb == 4095) { ++ if (vb == 4095 || shared->time_limit > 99 || shared->tc_time_remaining > 6000) { + va_start(ap, fmt); + if (log_file) + vfprintf(log_file, fmt, ap); +@@ -2788,6 +2790,15 @@ void *SharedMalloc(size_t size, int tid) #if defined(UNIX) int shmid; void *shared; |