summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch')
-rw-r--r--net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch
new file mode 100644
index 000000000000..5b703502e73c
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch
@@ -0,0 +1,25 @@
+Compile fix for illegal syntax to make GCC4 happy.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar -Nuar memcached-1.3.3.orig/slabs.c memcached-1.3.3/slabs.c
+--- memcached-1.3.3.orig/slabs.c 2009-04-02 12:29:32.000000000 -0700
++++ memcached-1.3.3/slabs.c 2009-06-03 14:11:04.134757232 -0700
+@@ -419,7 +419,7 @@
+ slab = p->slab_list[p->killing - 1];
+ slab_end = (char*)slab + POWER_BLOCK;
+
+- for (iter = slab; iter < slab_end; (char*)iter += p->size) {
++ for (iter = slab; iter < slab_end; iter = (char*)iter + p->size) {
+ item *it = (item *)iter;
+ if (it->slabs_clsid) {
+ if (it->refcount) was_busy = true;
+@@ -449,7 +449,7 @@
+ dp->end_page_free = dp->perslab;
+ /* this isn't too critical, but other parts of the code do asserts to
+ make sure this field is always 0. */
+- for (iter = slab; iter < slab_end; (char*)iter += dp->size) {
++ for (iter = slab; iter < slab_end; iter = (char*)iter + dp->size) {
+ ((item *)iter)->slabs_clsid = 0;
+ }
+ return 1;