Index: lib/crypto/md5.h
--- lib/crypto/md5.h.orig	2013-05-08 10:16:26.000000000 +0200
+++ lib/crypto/md5.h	2013-05-09 19:52:44.813747209 +0200
@@ -5,7 +5,7 @@
 #define HEADER_MD5_H 
 #endif
 
-#ifdef HAVE_MD5_H
+#if 0
 /*
  * Try to avoid clashes with Solaris MD5 implementation.
  * ...where almost all implementations follows:
Index: source3/configure
--- source3/configure.orig	2013-05-08 10:19:42.000000000 +0200
+++ source3/configure	2013-05-09 19:52:33.223566459 +0200
@@ -6698,6 +6698,7 @@
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/iniparser/src"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
 
 SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
@@ -35973,7 +35974,7 @@
 	LIBWBCLIENT_FULLVER=0
 	LIBWBCLIENT_SHARED_TARGET_SOVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_SOVER
 	LIBWBCLIENT_SHARED_TARGET_FULLVER=$LIBWBCLIENT_SHARED_TARGET.$LIBWBCLIENT_FULLVER
-	if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then
+	if false; then
 		NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}"
 		## Only worry about libwbclient if we have shared
 		# library support
@@ -40491,6 +40492,8 @@
 	CFLAGS="-I../lib/zlib $CFLAGS"
 
 fi
+LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET
+LIBWBCLIENT_SHARED=$LIBWBCLIENT_STATIC_TARGET
 
 
 # Check whether --enable-dmalloc was given.
Index: source3/lib/sysquotas_4A.c
--- source3/lib/sysquotas_4A.c.orig	2013-05-08 10:16:26.000000000 +0200
+++ source3/lib/sysquotas_4A.c	2013-05-09 19:52:33.223566459 +0200
@@ -71,6 +71,10 @@
 #define dqb_curinodes	dqb_curfiles
 #endif
 
+#if defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION-0 >= 2
+#define dqb_curblocks dqb_curspace
+#endif
+
 #ifdef INITQFNAMES
 #define USERQUOTAFILE_EXTENSION ".user"
 #else
