commit 0e3423f2eb2487d1572144bf2b4a72fe6f263c6a Author: Lars Müller Date: Tue Aug 12 23:01:20 2014 +0200 replace/wscript: Detect if we have a s390(x) system If that's the case define HAVE_INCOHERENT_MMAP. This isn't catched with the check in front of these lines. diff --git a/docs-xml/smbdotconf/tuning/usemmap.xml b/docs-xml/smbdotconf/tuning/usemmap.xml index c23fc35..e450ddf 100644 --- a/docs-xml/smbdotconf/tuning/usemmap.xml +++ b/docs-xml/smbdotconf/tuning/usemmap.xml @@ -5,10 +5,11 @@ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> This global parameter determines if the tdb internals of Samba can - depend on mmap working correctly on the running system. Samba requires a coherent - mmap/read-write system memory cache. Currently only HPUX does not have such a - coherent cache, and so this parameter is set to no by - default on HPUX. On all other systems this parameter should be left alone. This + depend on mmap working correctly on the running system. Samba requires a + coherent mmap/read-write system memory cache. Currently HPUX and s390(x) + do not have such a coherent cache, and so this parameter is set to + no by default on these systems. On all other systems + this parameter should be left alone. This parameter is provided to help the Samba developers track down problems with the tdb internal code. diff --git a/lib/replace/wscript b/lib/replace/wscript index a7384e8..5746abb 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -561,6 +561,10 @@ removeea setea define='HAVE_INCOHERENT_MMAP', msg="Checking for HAVE_INCOHERENT_MMAP") + # mmap on s390(x) leads to TDB corruption; see also bug 10765 + if conf.env['SYSTEM_UNAME_MACHINE'] == 's390' or conf.env['SYSTEM_UNAME_MACHINE'] == 's390x': + conf.DEFINE('HAVE_INCOHERENT_MMAP', 1) + conf.SAMBA_BUILD_ENV() conf.CHECK_CODE('''