summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-09-30 15:29:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-01 12:40:48 +0100
commit4f4bdc3da6098218666179cdb7a1854b5f92fc63 (patch)
treec327b52d39dd066a037f733ac5905d6031b2359a /meta/recipes-devtools/strace
parent0d410d56bf66d88f5b8176a7adab14d3a2f1941d (diff)
downloadpoky-4f4bdc3da6098218666179cdb7a1854b5f92fc63.tar.gz
strace: Define sched_attr conditionally
So that it does not conflict with glibc 2.41+ newly added definitions (From OE-Core rev: 76b02cd44d776ba01cbc238b33ecbe2978122244) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/strace')
-rw-r--r--meta/recipes-devtools/strace/strace/0001-sched_attr-Define-conditionally-on-SCHED_ATTR_SIZE_V.patch49
-rw-r--r--meta/recipes-devtools/strace/strace_6.11.bb1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-sched_attr-Define-conditionally-on-SCHED_ATTR_SIZE_V.patch b/meta/recipes-devtools/strace/strace/0001-sched_attr-Define-conditionally-on-SCHED_ATTR_SIZE_V.patch
new file mode 100644
index 0000000000..b8d57797df
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-sched_attr-Define-conditionally-on-SCHED_ATTR_SIZE_V.patch
@@ -0,0 +1,49 @@
1From d162a1d6b18348955f9989f150c86a68af096362 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 30 Sep 2024 15:17:16 -0700
4Subject: [PATCH] sched_attr: Define conditionally on SCHED_ATTR_SIZE_VER0
5
6glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions
7and struct sched_attr. Therefore, it needs to be checked for here as well before
8defining sched_attr
9
10Fixes builds with glibc/trunk
11
12In file included from ../../strace-6.11/src/sched.c:14:
13../../strace-6.11/src/sched_attr.h:16:8: error: redefinition of 'sched_attr'
14 16 | struct sched_attr {
15 | ^
16/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/strace/6.11/recipe-sysroot/usr/include/linux/sched/types.h:98:8: note: previous definition is here
17 98 | struct sched_attr {
18 | ^
19
20[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8
21
22Upstream-Status: Submitted [https://github.com/strace/strace/pull/318]
23Signed-off-by: Khem Raj <raj.khem@gmail.com>
24---
25 src/sched_attr.h | 4 ++++
26 1 file changed, 4 insertions(+)
27
28diff --git a/src/sched_attr.h b/src/sched_attr.h
29index 26c53172f..a5b5d94ce 100644
30--- a/src/sched_attr.h
31+++ b/src/sched_attr.h
32@@ -11,6 +11,8 @@
33
34 # include <stdint.h>
35
36+# ifndef SCHED_ATTR_SIZE_VER0
37+
38 struct sched_attr {
39 uint32_t size;
40 uint32_t sched_policy;
41@@ -25,6 +27,8 @@ struct sched_attr {
42 uint32_t sched_util_max;
43 };
44
45+# endif /* SCHED_ATTR_SIZE_VER0 */
46+
47 # define SCHED_ATTR_MIN_SIZE 48
48 # ifndef SCHED_ATTR_SIZE_VER1
49 # define SCHED_ATTR_SIZE_VER1 56
diff --git a/meta/recipes-devtools/strace/strace_6.11.bb b/meta/recipes-devtools/strace/strace_6.11.bb
index d98b5fdec9..45e1c26627 100644
--- a/meta/recipes-devtools/strace/strace_6.11.bb
+++ b/meta/recipes-devtools/strace/strace_6.11.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
14 file://skip-load.patch \ 14 file://skip-load.patch \
15 file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \ 15 file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \
16 file://0002-tests-Replace-off64_t-with-off_t.patch \ 16 file://0002-tests-Replace-off64_t-with-off_t.patch \
17 file://0001-sched_attr-Define-conditionally-on-SCHED_ATTR_SIZE_V.patch \
17 " 18 "
18SRC_URI[sha256sum] = "83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5" 19SRC_URI[sha256sum] = "83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5"
19 20