0002-examples-stress_test-Fix-build-with-musl-libc.patch 1.2 KB

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