]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
samba: Fix build with glibc 2.36
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Aug 2022 17:17:47 +0000 (17:17 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sun, 11 Sep 2022 08:36:17 +0000 (08:36 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/samba
src/patches/samba-4.16.4-glibc-headers.patch [new file with mode: 0644]

index 87d192492f5c2fd9a2c45a9b9705551aad4cf19c..d64d0e2d49bed35a9b45241ec9b28af785603a79 100644 (file)
--- a/lfs/samba
+++ b/lfs/samba
@@ -80,6 +80,7 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/samba-4.16.4-glibc-headers.patch
        cd $(DIR_APP) && ./configure \
                --prefix=/usr \
                --libdir=/usr/lib/ \
diff --git a/src/patches/samba-4.16.4-glibc-headers.patch b/src/patches/samba-4.16.4-glibc-headers.patch
new file mode 100644 (file)
index 0000000..8c75a41
--- /dev/null
@@ -0,0 +1,62 @@
+From 766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@samba.org>
+Date: Tue, 2 Aug 2022 07:55:46 +0200
+Subject: [PATCH] lib:replace: Only include <sys/mount.h> on non-Linux systems
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Details at:
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=15132
+
+Signed-off-by: Andreas Schneider <asn@samba.org>
+Reviewed-by: Ralph Boehme <slow@samba.org>
+
+Autobuild-User(master): Ralph Böhme <slow@samba.org>
+Autobuild-Date(master): Tue Aug  2 11:05:14 UTC 2022 on sn-devel-184
+---
+ lib/replace/system/filesys.h | 4 +++-
+ lib/replace/wscript          | 3 +++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
+index 034e5d5886c..bb9482c69af 100644
+--- a/lib/replace/system/filesys.h
++++ b/lib/replace/system/filesys.h
+@@ -36,7 +36,8 @@
+ #include <sys/param.h>
+ #endif
+-#ifdef HAVE_SYS_MOUNT_H
++/* This include is required on UNIX (*BSD, AIX, ...) for statfs() */
++#if !defined(LINUX) && defined(HAVE_SYS_MOUNT_H)
+ #include <sys/mount.h>
+ #endif
+@@ -44,6 +45,7 @@
+ #include <mntent.h>
+ #endif
++/* This include is required on Linux for statfs() */
+ #ifdef HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 4c774d9f0c3..dd9b19219a1 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -31,6 +31,9 @@ def configure(conf):
+     conf.env.standalone_replace = conf.IN_LAUNCH_DIR()
++    if sys.platform.rfind('linux') > -1:
++        conf.DEFINE('LINUX', '1')
++
+     conf.DEFINE('BOOL_DEFINED', 1)
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+-- 
+2.30.2
+