1From ddded7337812a2797d31f276624da98932d8e17f Mon Sep 17 00:00:00 2001
2From: Herve Codina <herve.codina@bootlin.com>
3Date: Sun, 9 Jan 2022 14:59:27 +0100
4Subject: [PATCH] examples/stress_test: Fix build with musl libc
5
6The musl C library uses sched_priority instead of
7__sched_priority as GNU libc and uClibc do.
8Use sched_priority instead.
9
10This does not break compilation with GNU libc and uClibc
11because they both define in sched.h:
12  #define sched_priority         __sched_priority
13
14This patch was submitted upstream.
15https://github.com/Parrot-Developers/libshdata/issues/3
16
17Signed-off-by: Herve Codina <herve.codina@bootlin.com>
18---
19 examples/stress_test.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/examples/stress_test.c b/examples/stress_test.c
23index a859115..cfb5418 100644
24--- a/examples/stress_test.c
25+++ b/examples/stress_test.c
26@@ -617,7 +617,7 @@ static void launch_test(int timer_fd, struct test_setup *setup)
27 	if (ret < 0)
28 		ULOGI("Error setting the timer : %s", strerror(errno));
29 	struct sched_param sched_params;
30-	sched_params.__sched_priority = sched_get_priority_max(SCHED_RR);
31+	sched_params.sched_priority = sched_get_priority_max(SCHED_RR);
32
33 	pid_t pid = fork();
34
35--
362.33.1
37
38