commit c6a4f805d0a8376260cf67bfeea12a21517c0f6d Author: Lars Müller Date: Tue Aug 12 23:01:20 2014 +0200 build: disable mmap on s390 systems If build on an s390(x) system define HAVE_INCOHERENT_MMAP to disable mmap by default on this architecture. This case isn't caught with the check in front of these lines. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10765 Signed-off-by: Lars Müller 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('''