Index: libmemcached-0.48/Makefile.in
--- libmemcached-0.48/Makefile.in.orig	2011-03-16 04:40:31.000000000 +0100
+++ libmemcached-0.48/Makefile.in	2011-03-18 18:43:52.000000000 +0100
@@ -95,10 +95,7 @@
 	clients/memerror$(EXEEXT) clients/memflush$(EXEEXT) \
 	clients/memrm$(EXEEXT) clients/memstat$(EXEEXT) \
 	$(am__EXEEXT_1)
-noinst_PROGRAMS = tests/atomsmasher$(EXEEXT) tests/hashplus$(EXEEXT) \
-	tests/memplus$(EXEEXT) tests/startservers$(EXEEXT) \
-	tests/testapp$(EXEEXT) tests/testhashkit$(EXEEXT) \
-	tests/testplus$(EXEEXT) tests/testudp$(EXEEXT) $(am__EXEEXT_3)
+noinst_PROGRAMS = 
 check_PROGRAMS = $(am__EXEEXT_2)
 @BUILD_DOCS_TRUE@am__append_1 = test-docs
 DIST_COMMON = README $(am__configure_deps) \
@@ -138,7 +135,7 @@
 @DTRACE_NEEDS_OBJECTS_TRUE@am__append_13 = libmemcached/libmemcached_probes.o
 @DTRACE_NEEDS_OBJECTS_TRUE@am__append_14 = libmemcached/libmemcached_probes.o
 @HAVE_SASL_TRUE@am__append_15 = $(LIBSASL)
-@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__append_16 = clients/memslap
+@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__append_16 =
 @BUILD_BYTEORDER_TRUE@am__append_17 = libmemcached/libbyteorder.la
 @INCLUDE_HSIEH_SRC_TRUE@am__append_18 = libhashkit/hsieh.c
 @INCLUDE_MURMUR_SRC_TRUE@am__append_19 = libhashkit/murmur.c
@@ -409,7 +406,7 @@
 libtest_libtest_la_LIBADD =
 am_libtest_libtest_la_OBJECTS = libtest/test.lo
 libtest_libtest_la_OBJECTS = $(am_libtest_libtest_la_OBJECTS)
-@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_1 = clients/memslap$(EXEEXT)
+@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_1 =
 @HAVE_LIBGTEST_TRUE@am__EXEEXT_2 = unittests/unittests$(EXEEXT)
 @HAVE_LIBEVENT_TRUE@am__EXEEXT_3 = example/memcached_light$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
Index: libmemcached-0.48/configure
--- libmemcached-0.48/configure.orig	2011-03-16 04:40:33.000000000 +0100
+++ libmemcached-0.48/configure	2011-03-18 18:43:13.000000000 +0100
@@ -17719,8 +17719,8 @@
 
 fi
 
-      CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
-      CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
+      CC_WARNINGS="${BASE_WARNINGS} ${CC_WARNINGS_FULL}"
+      CXX_WARNINGS="${BASE_WARNINGS} -Wnon-virtual-dtor -Wno-long-long ${CXX_WARNINGS_FULL}"
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wmissing-declarations from C++" >&5
 $as_echo_n "checking whether it is safe to use -Wmissing-declarations from C++... " >&6; }
Index: libmemcached-0.48/support/libmemcached.pc.in
--- libmemcached-0.48/support/libmemcached.pc.in.orig	2011-02-22 05:06:22.000000000 +0100
+++ libmemcached-0.48/support/libmemcached.pc.in	2011-03-18 18:43:13.000000000 +0100
@@ -8,3 +8,4 @@
 Version: @VERSION@
 Libs: @LTLIBSASL@ @LTLIBSASL2@ -L${libdir} -lmemcached
 Cflags: -I${includedir}
+Requires: libevent sasl
Index: memcached-1.4.6/configure
--- memcached-1.4.6/configure.orig	2010-04-03 23:26:12.000000000 +0200
+++ memcached-1.4.6/configure	2011-03-18 18:43:13.000000000 +0100
@@ -7914,7 +7914,6 @@
 elif test "$GCC" = "yes"
 then
   GCC_VERSION=`$CC -dumpversion`
-  CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
   case $GCC_VERSION in
     4.4.*)
     CFLAGS="$CFLAGS -fno-strict-aliasing"
Index: memcached-1.4.6/thread.c
--- memcached-1.4.6/thread.c.orig	2010-04-03 09:07:16.000000000 +0200
+++ memcached-1.4.6/thread.c	2011-03-18 18:43:13.000000000 +0100
@@ -602,6 +602,7 @@
         perror("Can't allocate thread descriptors");
         exit(1);
     }
+    memset(threads, 0, sizeof(LIBEVENT_THREAD) * nthreads);
 
     dispatcher_thread.base = main_base;
     dispatcher_thread.thread_id = pthread_self();
Index: libmemcache-1.4.0.rc2/src/buffer.c
--- libmemcache-1.4.0.rc2/src/buffer.c.orig	2009-11-25 18:36:18.468286813 +0100
+++ libmemcache-1.4.0.rc2/src/buffer.c	2009-11-25 18:36:20.700402681 +0100
@@ -36,6 +36,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <sys/errno.h>
+#include <errno.h>
 
 #include "memcache/buffer.h"
 
