buildroot/package/libshdata/0002-examples-stress_test-Fix-build-with-musl-libc.patch
Herve Codina d1e8f787e9 package/libshdata: new package
The libshdata library provides lock free shared-memory tools.

https://github.com/Parrot-Developers/libshdata

libshdata-stress utility does not compile using static libs
only (BR2_STATIC_LIBS=y). The issue was raised upstream:
  https://github.com/Parrot-Developers/libshdata/issues/2
For now, libshdata-stress simply depends on !BR2_STATIC_LIBS.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
[yann.morin.1998@free.fr:
  - do not macro-ify headers install
  - do not parameterise static libs install dest
  - do not parameterise binaries install dest
  - reorder macros decaration and use
  - remove spurious comma between module dependencies
  - implicit module name
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-12 00:29:54 +01:00

38 lines
1.2 KiB
Diff

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