From 6e0d48562b496a3326377722b94556bf02d3432f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Mar 2024 17:25:55 -0700 Subject: sdbus-c++-libsystemd: Upgrade to 255.4 release of systemd Synchronise musl patches with oe-core Signed-off-by: Khem Raj --- .../0013-Handle-__cpu_mask-usage.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Handle-__cpu_mask-usage.patch (limited to 'meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Handle-__cpu_mask-usage.patch') diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Handle-__cpu_mask-usage.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Handle-__cpu_mask-usage.patch new file mode 100644 index 000000000..43f75373a --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Handle-__cpu_mask-usage.patch @@ -0,0 +1,60 @@ +From 2f90f8463423cfbb7e83fcef42f1071018c3b56e Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Fri, 13 Sep 2019 19:26:27 -0400 +Subject: [PATCH 13/22] Handle __cpu_mask usage + +Fixes errors: + +src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) +src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) + +__cpu_mask is an internal type of glibc's cpu_set implementation, not +part of the POSIX definition, which is problematic when building with +musl, which does not define a matching type. From inspection of musl's +sched.h, however, it is clear that the corresponding type would be +unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, +add a typedef to cpu-set-util.h defining __cpu_mask appropriately. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Scott Murray +--- + src/shared/cpu-set-util.h | 2 ++ + src/test/test-sizeof.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h +index 3c63a58826..4c2d4347fc 100644 +--- a/src/shared/cpu-set-util.h ++++ b/src/shared/cpu-set-util.h +@@ -6,6 +6,8 @@ + #include "macro.h" + #include "missing_syscall.h" + ++typedef unsigned long __cpu_mask; ++ + /* This wraps the libc interface with a variable to keep the allocated size. */ + typedef struct CPUSet { + cpu_set_t *set; +diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c +index ea0c58770e..b65c0bd370 100644 +--- a/src/test/test-sizeof.c ++++ b/src/test/test-sizeof.c +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + +-#include + #include + #include + #include +@@ -12,6 +11,7 @@ + #include + + #include "time-util.h" ++#include "cpu-set-util.h" + + /* Print information about various types. Useful when diagnosing + * gcc diagnostics on an unfamiliar architecture. */ +-- +2.34.1 + -- cgit v1.2.3-54-g00ecf