From 16714958c85c869daef2f390f4d4f16915aa7943 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 19 May 2022 14:29:39 -0700 Subject: [PATCH] package/cpulimit: Remove or1k/musl limitation It turns out that we can build cpulimit for or1k using musl-libc if we remove the inclusion of the problematic procfs.h header file which is not required at all. This is a backport of the following upstream pull request: https://github.com/opsengine/cpulimit/pull/110 Signed-off-by: Florian Fainelli --- .../0004-Remove-procfs.h-inclusion.patch | 30 +++++++++++++++++++ package/cpulimit/Config.in | 5 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 package/cpulimit/0004-Remove-procfs.h-inclusion.patch diff --git a/package/cpulimit/0004-Remove-procfs.h-inclusion.patch b/package/cpulimit/0004-Remove-procfs.h-inclusion.patch new file mode 100644 index 000000000000..771c2fe12c71 --- /dev/null +++ b/package/cpulimit/0004-Remove-procfs.h-inclusion.patch @@ -0,0 +1,30 @@ +From 48a88c033c5704d37645051ca51799a8b5a7e059 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Thu, 19 May 2022 14:22:40 -0700 +Subject: [PATCH] Remove procfs.h inclusion + +We do not use anything from this header + +Signed-off-by: Florian Fainelli +[Upstream: https://github.com/opsengine/cpulimit/pull/110] +--- + src/process_iterator.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/process_iterator.c b/src/process_iterator.c +index 8b4019d237f2..5b6c651bc5d0 100644 +--- a/src/process_iterator.c ++++ b/src/process_iterator.c +@@ -22,9 +22,6 @@ + #include + #include + #include +-#ifndef __APPLE__ +-#include +-#endif + #include + #include "process_iterator.h" + +-- +2.25.1 + diff --git a/package/cpulimit/Config.in b/package/cpulimit/Config.in index cca74afc9955..11a4f1da01e2 100644 --- a/package/cpulimit/Config.in +++ b/package/cpulimit/Config.in @@ -1,12 +1,11 @@ -comment "cpulimit needs a toolchain w/ threads, does not build open openrisc with musl" +comment "cpulimit needs a toolchain w/ threads" depends on BR2_USE_MMU - depends on !BR2_TOOLCHAIN_HAS_THREADS || (BR2_or1k && BR2_TOOLCHAIN_USES_MUSL) + depends on !BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_CPULIMIT bool "cpulimit" depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_THREADS - depends on !(BR2_or1k && BR2_TOOLCHAIN_USES_MUSL) help Cpulimit is a tool which limits the CPU usage of a process (expressed in percentage, not in CPU time)