[Buildroot] [git commit] package/stress-ng: fix uclibc-ng build

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu May 9 14:15:18 UTC 2024


commit: https://git.buildroot.net/buildroot/commit/?id=10a59697e9a05954380d8dfb440a1c22efd6edf2
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 .../0002-core-sched.c-fix-uclibc-ng-build.patch    | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch b/package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch
new file mode 100644
index 0000000000..c9c4e22603
--- /dev/null
+++ b/package/stress-ng/0002-core-sched.c-fix-uclibc-ng-build.patch
@@ -0,0 +1,40 @@
+From f8dc9f790251562c3a4635edd29d7674298cd5f7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+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 <fontaine.fabrice at gmail.com>
+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



More information about the buildroot mailing list