diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch deleted file mode 100644 index 43f75373a6..0000000000 --- a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 2f90f8463423cfbb7e83fcef42f1071018c3b56e 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 13/22] 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 | diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h | ||
27 | index 3c63a58826..4c2d4347fc 100644 | ||
28 | --- a/src/shared/cpu-set-util.h | ||
29 | +++ b/src/shared/cpu-set-util.h | ||
30 | @@ -6,6 +6,8 @@ | ||
31 | #include "macro.h" | ||
32 | #include "missing_syscall.h" | ||
33 | |||
34 | +typedef unsigned long __cpu_mask; | ||
35 | + | ||
36 | /* This wraps the libc interface with a variable to keep the allocated size. */ | ||
37 | typedef struct CPUSet { | ||
38 | cpu_set_t *set; | ||
39 | diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c | ||
40 | index ea0c58770e..b65c0bd370 100644 | ||
41 | --- a/src/test/test-sizeof.c | ||
42 | +++ b/src/test/test-sizeof.c | ||
43 | @@ -1,6 +1,5 @@ | ||
44 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
45 | |||
46 | -#include <sched.h> | ||
47 | #include <stdio.h> | ||
48 | #include <string.h> | ||
49 | #include <sys/resource.h> | ||
50 | @@ -12,6 +11,7 @@ | ||
51 | #include <float.h> | ||
52 | |||
53 | #include "time-util.h" | ||
54 | +#include "cpu-set-util.h" | ||
55 | |||
56 | /* Print information about various types. Useful when diagnosing | ||
57 | * gcc diagnostics on an unfamiliar architecture. */ | ||
58 | -- | ||
59 | 2.34.1 | ||
60 | |||