archrelease: copy trunk to extra-x86_64
[arch-packages.git] / samba / repos / extra-x86_64 / samba-glibc-2.36.patch
blobaea0bf51d78d15f074626db7c593b52055ad22a9
1 From eee9ff0228f52008bfc565241f6dfe07ae7a7044 Mon Sep 17 00:00:00 2001
2 From: Andreas Schneider <asn@samba.org>
3 Date: Tue, 2 Aug 2022 07:55:46 +0200
4 Subject: [PATCH] lib:replace: Only include <sys/mount.h> on non-Linux systems
6 Details at:
7 https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
9 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15132
11 Signed-off-by: Andreas Schneider <asn@samba.org>
12 Reviewed-by: Ralph Boehme <slow@samba.org>
13 (cherry picked from commit 766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0)
14 ---
15 lib/replace/system/filesys.h | 4 +++-
16 lib/replace/wscript | 3 +++
17 2 files changed, 6 insertions(+), 1 deletion(-)
19 diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
20 index 034e5d5886c..bb9482c69af 100644
21 --- a/lib/replace/system/filesys.h
22 +++ b/lib/replace/system/filesys.h
23 @@ -36,7 +36,8 @@
24 #include <sys/param.h>
25 #endif
27 -#ifdef HAVE_SYS_MOUNT_H
28 +/* This include is required on UNIX (*BSD, AIX, ...) for statfs() */
29 +#if !defined(LINUX) && defined(HAVE_SYS_MOUNT_H)
30 #include <sys/mount.h>
31 #endif
33 @@ -44,6 +45,7 @@
34 #include <mntent.h>
35 #endif
37 +/* This include is required on Linux for statfs() */
38 #ifdef HAVE_SYS_VFS_H
39 #include <sys/vfs.h>
40 #endif
41 diff --git a/lib/replace/wscript b/lib/replace/wscript
42 index e4c2d513076..0db93d8caf1 100644
43 --- a/lib/replace/wscript
44 +++ b/lib/replace/wscript
45 @@ -31,6 +31,9 @@ def configure(conf):
47 conf.env.standalone_replace = conf.IN_LAUNCH_DIR()
49 + if sys.platform.rfind('linux') > -1:
50 + conf.DEFINE('LINUX', '1')
52 conf.DEFINE('BOOL_DEFINED', 1)
53 conf.DEFINE('HAVE_LIBREPLACE', 1)
54 conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
55 --
56 2.37.1