diff options
author | swills <swills@FreeBSD.org> | 2015-01-17 01:03:13 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2015-01-17 01:03:13 +0800 |
commit | 4d502d3c984bfb49b2c8a630af9d3c9cb69bddf3 (patch) | |
tree | 34e1230bbd509418ab1c807cdd8cdc0ce209e25d /databases | |
parent | 6c87fddc0362c7a1a08ccba85b3e87fc4b9a45b1 (diff) | |
download | freebsd-ports-gnome-4d502d3c984bfb49b2c8a630af9d3c9cb69bddf3.tar.gz freebsd-ports-gnome-4d502d3c984bfb49b2c8a630af9d3c9cb69bddf3.tar.zst freebsd-ports-gnome-4d502d3c984bfb49b2c8a630af9d3c9cb69bddf3.zip |
databases/memcached: fix build with clang 3.5
Diffstat (limited to 'databases')
-rw-r--r-- | databases/memcached/files/patch-memcached.c | 74 | ||||
-rw-r--r-- | databases/memcached/files/patch-thread.c | 11 |
2 files changed, 85 insertions, 0 deletions
diff --git a/databases/memcached/files/patch-memcached.c b/databases/memcached/files/patch-memcached.c new file mode 100644 index 000000000000..e8ad907f82ee --- /dev/null +++ b/databases/memcached/files/patch-memcached.c @@ -0,0 +1,74 @@ +--- memcached.c.orig 2014-10-13 03:33:10.000000000 +0000 ++++ memcached.c 2015-01-16 16:21:34.000000000 +0000 +@@ -280,7 +280,7 @@ + c->msgbytes = 0; + c->msgused++; + +- if (IS_UDP(c->transport)) { ++ if IS_UDP(c->transport) { + /* Leave room for the UDP header, which we'll fill in later. */ + return add_iov(c, NULL, UDP_HEADER_SIZE); + } +@@ -424,7 +424,7 @@ + if (init_state == conn_listening) { + fprintf(stderr, "<%d server listening (%s)\n", sfd, + prot_text(c->protocol)); +- } else if (IS_UDP(transport)) { ++ } else if IS_UDP(transport) { + fprintf(stderr, "<%d server listening (udp)\n", sfd); + } else if (c->protocol == negotiating_prot) { + fprintf(stderr, "<%d new auto-negotiating client connection\n", +@@ -523,7 +523,7 @@ + c->sasl_conn = NULL; + } + +- if (IS_UDP(c->transport)) { ++ if IS_UDP(c->transport) { + conn_set_state(c, conn_read); + } + } +@@ -593,7 +593,7 @@ + static void conn_shrink(conn *c) { + assert(c != NULL); + +- if (IS_UDP(c->transport)) ++ if IS_UDP(c->transport) + return; + + if (c->rsize > READ_BUFFER_HIGHWAT && c->rbytes < DATA_BUFFER_SIZE) { +@@ -3989,7 +3989,7 @@ + if (settings.verbose > 0) + perror("Failed to write, and not due to blocking"); + +- if (IS_UDP(c->transport)) ++ if IS_UDP(c->transport) + conn_set_state(c, conn_read); + else + conn_set_state(c, conn_closing); +@@ -4313,7 +4313,7 @@ + break; + + case conn_closing: +- if (IS_UDP(c->transport)) ++ if IS_UDP(c->transport) + conn_cleanup(c); + else + conn_close(c); +@@ -4473,7 +4473,7 @@ + #endif + + setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags)); +- if (IS_UDP(transport)) { ++ if IS_UDP(transport) { + maximize_sndbuf(sfd); + } else { + error = setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags)); +@@ -4528,7 +4528,7 @@ + } + } + +- if (IS_UDP(transport)) { ++ if IS_UDP(transport) { + int c; + + for (c = 0; c < settings.num_threads_per_udp; c++) { diff --git a/databases/memcached/files/patch-thread.c b/databases/memcached/files/patch-thread.c new file mode 100644 index 000000000000..add698d65f1c --- /dev/null +++ b/databases/memcached/files/patch-thread.c @@ -0,0 +1,11 @@ +--- thread.c.orig 2015-01-16 16:22:19.000000000 +0000 ++++ thread.c 2015-01-16 16:22:27.000000000 +0000 +@@ -409,7 +409,7 @@ + conn *c = conn_new(item->sfd, item->init_state, item->event_flags, + item->read_buffer_size, item->transport, me->base); + if (c == NULL) { +- if (IS_UDP(item->transport)) { ++ if IS_UDP(item->transport) { + fprintf(stderr, "Can't listen for events on UDP socket\n"); + exit(1); + } else { |