aboutsummaryrefslogtreecommitdiffstats
path: root/community/dircproxy/fix-gcc4-issue.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2016-10-31 07:33:12 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2016-10-31 07:33:24 +0000
commit5ede648bb14d6fde854832d2c633b777797fb879 (patch)
treeed146050fc2c78b93d0754bc367cf68f21cbe711 /community/dircproxy/fix-gcc4-issue.patch
parent61d3fafd055aff8f7e62251ef583679536feb2a2 (diff)
downloadaports-5ede648bb14d6fde854832d2c633b777797fb879.tar.bz2
aports-5ede648bb14d6fde854832d2c633b777797fb879.tar.xz
community/dircproxy: move into community
Diffstat (limited to 'community/dircproxy/fix-gcc4-issue.patch')
-rw-r--r--community/dircproxy/fix-gcc4-issue.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/community/dircproxy/fix-gcc4-issue.patch b/community/dircproxy/fix-gcc4-issue.patch
new file mode 100644
index 0000000000..a839ee8abc
--- /dev/null
+++ b/community/dircproxy/fix-gcc4-issue.patch
@@ -0,0 +1,63 @@
+From 35eee84559717e378bf11a882bea9cf0b1b95238 Mon Sep 17 00:00:00 2001
+From: fharvey <fharvey@36e7e03e-8437-11dd-8f23-d9c8888c2974>
+Date: Sun, 19 Feb 2006 16:46:06 +0000
+Subject: [PATCH] Fix GCC 4.0 issue, tanks to lewk@*.edu. Close #39 and #46
+
+---
+ src/dcc_net.c | 3 ++-
+ src/irc_server.c | 6 ++++--
+ src/net.c | 3 +--
+ 3 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/dcc_net.c b/src/dcc_net.c
+index 6b90f29..1902561 100644
+--- a/src/dcc_net.c
++++ b/src/dcc_net.c
+@@ -368,7 +368,8 @@ int dccnet_expunge_proxies(void) {
+ n = p->next;
+ _dccnet_free(p);
+
+- p = (l ? l->next : proxies) = n;
++ if (l) l->next = n; else proxies = n;
++ p = n;
+ } else {
+ l = p;
+ p = p->next;
+diff --git a/src/irc_server.c b/src/irc_server.c
+index 38f4768..4ffdfca 100644
+--- a/src/irc_server.c
++++ b/src/irc_server.c
+@@ -788,7 +788,8 @@ static int _ircserver_gotmsg(struct ircproxy *p, const char *str) {
+ free(s);
+
+ /* Was in the squelch list, so remove it and stop looking */
+- s = (l ? l->next : p->squelch_modes) = n;
++ if (l) l->next = n; else p->squelch_modes = n;
++ s = n;
+ squelch = 1;
+ break;
+ } else {
+@@ -829,7 +830,8 @@ static int _ircserver_gotmsg(struct ircproxy *p, const char *str) {
+ free(s);
+
+ /* Was in the squelch list, so remove it and stop looking */
+- s = (l ? l->next : p->squelch_modes) = n;
++ if (l) l->next = n; else p->squelch_modes = n;
++ s = n;
+ squelch = 1;
+ break;
+ } else {
+diff --git a/src/net.c b/src/net.c
+index a971fea..8147acd 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -459,8 +459,7 @@ static int _net_buffer(struct sockinfo *s, int buff, int mode,
+ return 0;
+ }
+
+- l = &(buff == SB_IN ? s->in_buff_last : s->out_buff_last);
+-
++ l = (buff == SB_IN) ? &s->in_buff_last : &s->out_buff_last;
+ /* Check whether we can just add to the existing buffer */
+ if ((mode == SM_RAW) && *l && ((*l)->mode == mode)) {
+ (*l)->data = realloc((*l)->data, (*l)->len + len);