aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-07-29 12:19:25 -0700
committerKhem Raj <raj.khem@gmail.com>2022-08-06 22:53:24 -0700
commitf7ae5c6dca35f12150e87cbebcd9ce2e563ea50f (patch)
tree1ccf4ef6ea5dd6e730939bb7280f223c52666af5
parent32b42cd3e52b8fa0e306c21585a2bf64b50284b8 (diff)
downloadmeta-openembedded-f7ae5c6dca35f12150e87cbebcd9ce2e563ea50f.tar.gz
sdbus-c++-libsystemd: Fix build with glibc 2.36
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-glibc-Remove-include-linux-fs.h-to-resolve-fsconfig_.patch74
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.3.bb1
2 files changed, 75 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-glibc-Remove-include-linux-fs.h-to-resolve-fsconfig_.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-glibc-Remove-include-linux-fs.h-to-resolve-fsconfig_.patch
new file mode 100644
index 0000000000..01afd37a37
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-glibc-Remove-include-linux-fs.h-to-resolve-fsconfig_.patch
@@ -0,0 +1,74 @@
+From b0933e76c6f0594c10cf8a9a70b34e15b68066d1 Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+Date: Sat, 23 Jul 2022 10:38:49 +0000
+Subject: [PATCH] glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/pull/23992/commits/21c03ad5e9d8d0350e30dae92a5e15da318a1539]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson.build | 13 ++++++++++++-
+ src/basic/fd-util.c | 2 ++
+ src/core/namespace.c | 2 ++
+ src/shared/mount-util.c | 2 ++
+ 4 files changed, 18 insertions(+), 1 deletion(-)
+
+--- a/meson.build
++++ b/meson.build
+@@ -474,7 +474,6 @@ decl_headers = '''
+ #include <uchar.h>
+ #include <sys/mount.h>
+ #include <sys/stat.h>
+-#include <linux/fs.h>
+ '''
+
+ foreach decl : ['char16_t',
+@@ -486,6 +485,17 @@ foreach decl : ['char16_t',
+ # We get -1 if the size cannot be determined
+ have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
+
++ if decl == 'struct mount_attr'
++ if have
++ want_linux_fs_h = false
++ else
++ have = cc.sizeof(decl,
++ prefix : decl_headers + '#include <linux/fs.h>',
++ args : '-D_GNU_SOURCE') > 0
++ want_linux_fs_h = have
++ endif
++ endif
++
+ if decl == 'struct statx'
+ if have
+ want_linux_stat_h = false
+@@ -501,6 +511,7 @@ foreach decl : ['char16_t',
+ endforeach
+
+ conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
++conf.set10('WANT_LINUX_FS_H', want_linux_fs_h)
+
+ foreach ident : ['secure_getenv', '__secure_getenv']
+ conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
+--- a/src/core/namespace.c
++++ b/src/core/namespace.c
+@@ -6,7 +6,9 @@
+ #include <stdio.h>
+ #include <sys/mount.h>
+ #include <unistd.h>
++#if WANT_LINUX_FS_H
+ #include <linux/fs.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "base-filesystem.h"
+--- a/src/shared/mount-util.c
++++ b/src/shared/mount-util.c
+@@ -7,7 +7,9 @@
+ #include <sys/statvfs.h>
+ #include <unistd.h>
+ #include <linux/loop.h>
++#if WANT_LINUX_FS_H
+ #include <linux/fs.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "chase-symlinks.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.3.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.3.bb
index d5c799aac3..853cc20b67 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.3.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.3.bb
@@ -14,6 +14,7 @@ SRCREV = "73be9643910c3f7f3ff84765d63060846c110016"
SRCBRANCH = "v250-stable"
SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \
file://static-libsystemd-pkgconfig.patch \
+ file://0001-glibc-Remove-include-linux-fs.h-to-resolve-fsconfig_.patch \
"
# patches needed by musl