summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2009-10-21 20:19:08 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2009-10-21 20:19:08 +0000
commitc56b3f0fe698a6dc5d5a1922f684f4a26feb52e8 (patch)
treebb14e12b166b2c260dbabef9133f8380baf7aaba /games-util/xqf/files
parentFix playing of sound. Install sound files under SITEETC. (diff)
downloadhistorical-c56b3f0fe698a6dc5d5a1922f684f4a26feb52e8.tar.gz
historical-c56b3f0fe698a6dc5d5a1922f684f4a26feb52e8.tar.bz2
historical-c56b3f0fe698a6dc5d5a1922f684f4a26feb52e8.zip
Add patch to avoid cpu burn - submitted by Yannick Martin via bug #288853
Package-Manager: portage-2.1.6.13/cvs/Linux i686
Diffstat (limited to 'games-util/xqf/files')
-rw-r--r--games-util/xqf/files/xqf-1.0.5-cpu-overrun.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/games-util/xqf/files/xqf-1.0.5-cpu-overrun.patch b/games-util/xqf/files/xqf-1.0.5-cpu-overrun.patch
new file mode 100644
index 000000000000..567d82a6a6c2
--- /dev/null
+++ b/games-util/xqf/files/xqf-1.0.5-cpu-overrun.patch
@@ -0,0 +1,22 @@
+diff -aburN xqf.orig/src/launch.c xqf/src/launch.c
+--- xqf.orig/src/launch.c 2009-10-13 11:58:24.000000000 +0200
++++ xqf/src/launch.c 2009-10-13 11:59:35.000000000 +0200
+@@ -168,13 +168,17 @@
+
+ res = read (fd, cl->buffer + cl->pos, CLIENT_ERROR_BUFFER - 1 - cl->pos);
+
+- if (res <= 0) { /* read error or EOF */
++ if (res < 0) { /* read error or EOF */
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
+ return;
+
+ client_detach (cl);
+ return;
+ }
++ else if (res == 0) {
++ client_detach (cl);
++ return;
++ }
+
+ if (cl->pos + res == CLIENT_ERROR_BUFFER - 1) {
+ tmp = &cl->buffer[CLIENT_ERROR_BUFFER - 1];