diff options
author | joerg <joerg@pkgsrc.org> | 2017-06-08 14:06:38 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2017-06-08 14:06:38 +0000 |
commit | 8c7da374dd12b680d7e7c067cc8899c054ff81ec (patch) | |
tree | 1fbdebd8c38252816df5892c9c74dff8e9ca936e /games/wormz | |
parent | 3f66571c53dd4e643298f78eba9532b2a4f5d740 (diff) | |
download | pkgsrc-8c7da374dd12b680d7e7c067cc8899c054ff81ec.tar.gz |
Fix error checking for shmat. Ensure that PrintErr is actually defined.
Diffstat (limited to 'games/wormz')
-rw-r--r-- | games/wormz/distinfo | 5 | ||||
-rw-r--r-- | games/wormz/patches/patch-Common_Utils.cc | 15 | ||||
-rw-r--r-- | games/wormz/patches/patch-ba | 18 |
3 files changed, 33 insertions, 5 deletions
diff --git a/games/wormz/distinfo b/games/wormz/distinfo index ecd6e184a19..bddc4f7082b 100644 --- a/games/wormz/distinfo +++ b/games/wormz/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.15 2015/11/03 20:57:07 agc Exp $ +$NetBSD: distinfo,v 1.16 2017/06/08 14:06:38 joerg Exp $ SHA1 (Wormz-1.0b5.tar.gz) = a5e45e90fcc0eb4d188508bdffe71220ddcd20a4 RMD160 (Wormz-1.0b5.tar.gz) = 38411dcc3611d70d5873bf512439cd707372ef9e SHA512 (Wormz-1.0b5.tar.gz) = b0dcc1bf7043b8af4417a77f92be11511142b026b4d336ece4a4a81e0ce77d39a30d8d9a18937f3c92daa81701402aab0f95861cd3d82e3221ac4d21ae8c2735 Size (Wormz-1.0b5.tar.gz) = 436954 bytes +SHA1 (patch-Common_Utils.cc) = c7fd0d05c95e05e9eb53ec120d5ea83c022f044c SHA1 (patch-aa) = 4b591f9ac5bc4bf4b7864e4400ff6f0b5cd6ed20 SHA1 (patch-ab) = d62c08ae21475f43f9e0ef25421b672943b24ed4 SHA1 (patch-ac) = 7a7764b24bd5c1c6f5121508b9bf618a71cdc8de @@ -30,6 +31,6 @@ SHA1 (patch-aw) = b2d855826ffc9b67876acfe7da3b91a7ff5ea34a SHA1 (patch-ax) = 514898af5dcf6b88adcbbc2e910dab463099e2f5 SHA1 (patch-ay) = 9f673fd72c1b111163c95038933b9ffb68474138 SHA1 (patch-az) = 334817c8e6f92a39f8df8e0e645ae13c0716bd52 -SHA1 (patch-ba) = 80da240b3439b4cbc30e2796189ee94750c9021d +SHA1 (patch-ba) = 9dee52aa7d37e94727a93b7372f97bc5afb73b2f SHA1 (patch-bb) = fd59f3ccf4cd4cf3616199b2990abcced4e6fb42 SHA1 (patch-include_Debug.hh) = 67d9fdf4e214be4695f00d1baf9b43910479c395 diff --git a/games/wormz/patches/patch-Common_Utils.cc b/games/wormz/patches/patch-Common_Utils.cc new file mode 100644 index 00000000000..242bbeb779f --- /dev/null +++ b/games/wormz/patches/patch-Common_Utils.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-Common_Utils.cc,v 1.1 2017/06/08 14:06:38 joerg Exp $ + +Ensure that PrintErr is actually defined. + +--- Common/Utils.cc.orig 2017-06-07 12:11:12.198556624 +0000 ++++ Common/Utils.cc +@@ -2,7 +2,7 @@ + //#include <iostream.h> + #include <stdlib.h> + +-extern MyErrStream PrintErr; ++MyErrStream PrintErr; + + bool Rectangle::Inside(const Point& p) const + { diff --git a/games/wormz/patches/patch-ba b/games/wormz/patches/patch-ba index c895b84b26e..c8d927d5298 100644 --- a/games/wormz/patches/patch-ba +++ b/games/wormz/patches/patch-ba @@ -1,7 +1,10 @@ -$NetBSD: patch-ba,v 1.1 2005/06/14 16:33:13 jmmv Exp $ +$NetBSD: patch-ba,v 1.2 2017/06/08 14:06:38 joerg Exp $ ---- Xlib/XlibImage.cc.orig 2005-06-14 17:01:14.191898576 +0200 -+++ Xlib/XlibImage.cc 2005-06-14 17:01:32.255152544 +0200 +Avoid missing prototypes. +Check buffer for the error value, pointers are not signed. + +--- Xlib/XlibImage.cc.orig 1997-09-09 13:24:11.000000000 +0000 ++++ Xlib/XlibImage.cc @@ -2,6 +2,7 @@ #include <X11/Xutil.h> #include <sys/ipc.h> @@ -10,3 +13,12 @@ $NetBSD: patch-ba,v 1.1 2005/06/14 16:33:13 jmmv Exp $ #include "Utils.hh" static bool DontUseShm = FALSE; +@@ -173,7 +174,7 @@ XSHMBuffer::XSHMBuffer(XDrawable* mainw) + "can't create shared memory ID"); + buffer = (Pixel_t *) shmat(shminfo.shmid, 0, 0); + shminfo.shmaddr = (char *) buffer; +- if (buffer < 0) { ++ if (buffer == (void *)-1) { + shmctl(shminfo.shmid, IPC_RMID, 0); + Die("can't map shared memory"); + } |