Skip to contentSkip to conversation

package/stress-ng: fix uclibc-ng build

PATCH Applied Fabrice Fontaine 2 participants 2 messages May 8, 2024 – May 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/stress-ng: fix uclibc-ng build

Fix the following uclibc-ng build failure raised since bump to version 0.17.07 in commit 6fb179b906a1755d77bda9e501c5335ac163f3cb and
https://github.com/ColinIanKing/stress-ng/commit/e75ecbc8994e94b9e151b1191c1888bd2821fe72:

In file included from core-sched.c:25:
core-sched.c: In function 'stress_set_sched':
core-sched.c:170:22: error: 'struct shim_sched_attr' has no member named '__sched_priority'; did you mean 'sched_priority'?

  170 |                 attr.sched_priority = (unsigned int)sched_priority;
      |                      ^~~~~~~~~~~~~~
Fixes 6fb179b906a1755d77bda9e501c5335ac163f3cb

- http://autobuild.buildroot.org/results/d7d38dbb10f7f188da8dccc44a84a3c46a720bed

---
 ...002-core-sched.c-fix-uclibc-ng-build.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch
package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch new file +40 -0
new file mode 100644
index 0000000000..c9c4e22603
@@ -0,0 +1,40 @@
+From f8dc9f790251562c3a4635edd29d7674298cd5f7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 4 May 2024 17:52:32 +0200
+Subject: [PATCH] core-sched.c: fix uclibc-ng build
+
+Since version 0.17.02 and commit
+e75ecbc8994e94b9e151b1191c1888bd2821fe72, sched.h is not included before
+including core-shim.h. The issue is that core-shim.h defines its own
+sched_priority parameter in shim_sched_attr. When sched.h is included
+after core-shim.h, the build will fail because __sched_priority will not
+be found:
+
+In file included from core-sched.c:25:
+core-sched.c: In function 'stress_set_sched':
+core-sched.c:170:22: error: 'struct shim_sched_attr' has no member named '__sched_priority'; did you mean 'sched_priority'?
+  170 |                 attr.sched_priority = (unsigned int)sched_priority;
+      |                      ^~~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d7d38dbb10f7f188da8dccc44a84a3c46a720bed
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+Upstream: https://github.com/ColinIanKing/stress-ng/commit/f8dc9f790251562c3a4635edd29d7674298cd5f7
+---
+ core-shim.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/core-shim.h b/core-shim.h
+index bed4cf2f6..475aac512 100644
+--- a/core-shim.h
++++ b/core-shim.h
+@@ -23,6 +23,8 @@
+ #include <sys/uio.h>
+ #endif
+ 
++#include <sched.h>
++
+ /*
+  *  BeagleBoneBlack with 4.1.15 kernel does not
+  *  define the following, these should be defined
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · On Wed, 8 May 2024 22:11:30 +0200 Fabrice Fontaine…

Fix the following uclibc-ng build failure raised since bump to version 0.17.07 in commit 6fb179b906a1755d77bda9e501c5335ac163f3cb and
https://github.com/ColinIanKing/stress-ng/commit/e75ecbc8994e94b9e151b1191c1888bd2821fe72:

In file included from core-sched.c:25:
core-sched.c: In function 'stress_set_sched':
core-sched.c:170:22: error: 'struct shim_sched_attr' has no member named '__sched_priority'; did you mean 'sched_priority'?

  170 |                 attr.sched_priority = (unsigned int)sched_priority;
      |                      ^~~~~~~~~~~~~~
Quoted 8 lines
Fixes 6fb179b906a1755d77bda9e501c5335ac163f3cb

- http://autobuild.buildroot.org/results/d7d38dbb10f7f188da8dccc44a84a3c46a720bed

---
 ...002-core-sched.c-fix-uclibc-ng-build.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot