summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-11-29 22:10:24 -0800
committerKhem Raj <raj.khem@gmail.com>2023-11-29 22:19:11 -0800
commite1eafe6d9b83ab856c4f30bb0fd92ff537a044ce (patch)
tree775334d17d4bc3c509d898bd417940af20ff34d2 /meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch
parent41f16dc063f3aea57f3cba2d780d0327676d1e15 (diff)
downloadmeta-openembedded-e1eafe6d9b83ab856c4f30bb0fd92ff537a044ce.tar.gz
sdbus-c++-libsystemd: Upgrade to 254
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch')
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch
new file mode 100644
index 000000000..580aff327
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch
@@ -0,0 +1,53 @@
1From a50ec65dbe660421052656dda7499c925005f486 Mon Sep 17 00:00:00 2001
2From: Scott Murray <scott.murray@konsulko.com>
3Date: Fri, 13 Sep 2019 19:26:27 -0400
4Subject: [PATCH] Handle __cpu_mask usage
5
6Fixes errors:
7
8src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function)
9src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function)
10
11__cpu_mask is an internal type of glibc's cpu_set implementation, not
12part of the POSIX definition, which is problematic when building with
13musl, which does not define a matching type. From inspection of musl's
14sched.h, however, it is clear that the corresponding type would be
15unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So,
16add a typedef to cpu-set-util.h defining __cpu_mask appropriately.
17
18Upstream-Status: Inappropriate [musl specific]
19
20Signed-off-by: Scott Murray <scott.murray@konsulko.com>
21---
22 src/shared/cpu-set-util.h | 2 ++
23 src/test/test-sizeof.c | 2 +-
24 2 files changed, 3 insertions(+), 1 deletion(-)
25
26--- a/src/shared/cpu-set-util.h
27+++ b/src/shared/cpu-set-util.h
28@@ -6,6 +6,8 @@
29 #include "macro.h"
30 #include "missing_syscall.h"
31
32+typedef unsigned long __cpu_mask;
33+
34 /* This wraps the libc interface with a variable to keep the allocated size. */
35 typedef struct CPUSet {
36 cpu_set_t *set;
37--- a/src/test/test-sizeof.c
38+++ b/src/test/test-sizeof.c
39@@ -1,6 +1,5 @@
40 /* SPDX-License-Identifier: LGPL-2.1-or-later */
41
42-#include <sched.h>
43 #include <stdio.h>
44 #include <string.h>
45 #include <sys/resource.h>
46@@ -12,6 +11,7 @@
47 #include <float.h>
48
49 #include "time-util.h"
50+#include "cpu-set-util.h"
51
52 /* Print information about various types. Useful when diagnosing
53 * gcc diagnostics on an unfamiliar architecture. */