diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-11-29 22:10:24 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-29 22:19:11 -0800 |
commit | e1eafe6d9b83ab856c4f30bb0fd92ff537a044ce (patch) | |
tree | 775334d17d4bc3c509d898bd417940af20ff34d2 /meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch | |
parent | 41f16dc063f3aea57f3cba2d780d0327676d1e15 (diff) | |
download | meta-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.patch | 53 |
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 @@ | |||
1 | From a50ec65dbe660421052656dda7499c925005f486 Mon Sep 17 00:00:00 2001 | ||
2 | From: Scott Murray <scott.murray@konsulko.com> | ||
3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 | ||
4 | Subject: [PATCH] Handle __cpu_mask usage | ||
5 | |||
6 | Fixes errors: | ||
7 | |||
8 | src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) | ||
9 | src/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 | ||
12 | part of the POSIX definition, which is problematic when building with | ||
13 | musl, which does not define a matching type. From inspection of musl's | ||
14 | sched.h, however, it is clear that the corresponding type would be | ||
15 | unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, | ||
16 | add a typedef to cpu-set-util.h defining __cpu_mask appropriately. | ||
17 | |||
18 | Upstream-Status: Inappropriate [musl specific] | ||
19 | |||
20 | Signed-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. */ | ||