diff options
author | delphij <delphij@FreeBSD.org> | 2007-07-03 17:14:19 +0800 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-07-03 17:14:19 +0800 |
commit | 1085c5b24cf5dea17a9a3a18502a47c31ee0f77c (patch) | |
tree | 58386cbd8953ad49f3b759ed99470052b5cb8da2 /net/plb | |
parent | a5ef992d9ea2a41b4a507ecbbac5fdfe4406ce25 (diff) | |
download | freebsd-ports-gnome-1085c5b24cf5dea17a9a3a18502a47c31ee0f77c.tar.gz freebsd-ports-gnome-1085c5b24cf5dea17a9a3a18502a47c31ee0f77c.tar.zst freebsd-ports-gnome-1085c5b24cf5dea17a9a3a18502a47c31ee0f77c.zip |
Fix gcc 4.2 build.
Diffstat (limited to 'net/plb')
-rw-r--r-- | net/plb/Makefile | 4 | ||||
-rw-r--r-- | net/plb/files/patch-src__plb_session.c | 50 |
2 files changed, 50 insertions, 4 deletions
diff --git a/net/plb/Makefile b/net/plb/Makefile index beb9f34643f3..664358c0d665 100644 --- a/net/plb/Makefile +++ b/net/plb/Makefile @@ -24,10 +24,6 @@ DOCS= AUTHORS CONTACT COPYING NEWS README THANKS TODO .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 700042 -BROKEN= Does not compile with GCC 4.2 -.endif - post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/plb.sh.sample \ > ${WRKSRC}/plb.sh.sample diff --git a/net/plb/files/patch-src__plb_session.c b/net/plb/files/patch-src__plb_session.c new file mode 100644 index 000000000000..36683c5a88a1 --- /dev/null +++ b/net/plb/files/patch-src__plb_session.c @@ -0,0 +1,50 @@ +--- ./src/plb_session.c.orig 2003-02-26 22:57:58.000000000 +0800 ++++ ./src/plb_session.c 2007-07-03 17:13:15.588392762 +0800 +@@ -8,6 +8,8 @@ + # include <dmalloc.h> + #endif + ++#define EVENT_FD_(e) ((e)->ev_fd) ++ + void client_disconnect(Client * const client) + { + current_nb_clients--; +@@ -31,19 +33,19 @@ + } + if (EVENT_FD((&client->server_read_ev)) != -1) { + event_del(&client->server_read_ev); +- EVENT_FD((&client->server_read_ev)) = -1; ++ EVENT_FD_((&client->server_read_ev)) = -1; + } + if (EVENT_FD((&client->server_write_ev)) != -1) { + event_del(&client->server_write_ev); +- EVENT_FD((&client->server_write_ev)) = -1; ++ EVENT_FD_((&client->server_write_ev)) = -1; + } + if (EVENT_FD((&client->client_read_ev)) != -1) { + event_del(&client->client_read_ev); +- EVENT_FD((&client->client_read_ev)) = -1; ++ EVENT_FD_((&client->client_read_ev)) = -1; + } + if (EVENT_FD((&client->client_write_ev)) != -1) { + event_del(&client->client_write_ev); +- EVENT_FD((&client->client_write_ev)) = -1; ++ EVENT_FD_((&client->client_write_ev)) = -1; + } + if (client->server_fd != -1) { + while (close(client->server_fd) != 0 && errno == EINTR); +@@ -137,10 +139,10 @@ + client->postbuf_written = (size_t) 0U; + client->replybuf_len = (size_t) 0U; + client->replybuf_written = (size_t) 0U; +- EVENT_FD((&client->client_read_ev)) = -1; +- EVENT_FD((&client->client_write_ev)) = -1; +- EVENT_FD((&client->server_read_ev)) = -1; +- EVENT_FD((&client->server_write_ev)) = -1; ++ EVENT_FD_((&client->client_read_ev)) = -1; ++ EVENT_FD_((&client->client_write_ev)) = -1; ++ EVENT_FD_((&client->server_read_ev)) = -1; ++ EVENT_FD_((&client->server_write_ev)) = -1; + event_set(&client->client_read_ev, client_fd, + EV_READ, client_read, &clients[client_fd]); + event_add(&client->client_read_ev, &timeout_header_client_read); |