Skip to content

Commit 1671495

Browse files
committed
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: opsengine/cpulimit#110 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
1 parent e751e98 commit 1671495

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 48a88c033c5704d37645051ca51799a8b5a7e059 Mon Sep 17 00:00:00 2001
2+
From: Florian Fainelli <f.fainelli@gmail.com>
3+
Date: Thu, 19 May 2022 14:22:40 -0700
4+
Subject: [PATCH] Remove procfs.h inclusion
5+
6+
We do not use anything from this header
7+
8+
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
9+
[Upstream: https://github.com/opsengine/cpulimit/pull/110]
10+
---
11+
src/process_iterator.c | 3 ---
12+
1 file changed, 3 deletions(-)
13+
14+
diff --git a/src/process_iterator.c b/src/process_iterator.c
15+
index 8b4019d237f2..5b6c651bc5d0 100644
16+
--- a/src/process_iterator.c
17+
+++ b/src/process_iterator.c
18+
@@ -22,9 +22,6 @@
19+
#include <stdio.h>
20+
#include <stdlib.h>
21+
#include <string.h>
22+
-#ifndef __APPLE__
23+
-#include <sys/procfs.h>
24+
-#endif
25+
#include <time.h>
26+
#include "process_iterator.h"
27+
28+
--
29+
2.25.1
30+

package/cpulimit/Config.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
comment "cpulimit needs a toolchain w/ threads, does not build open openrisc with musl"
1+
comment "cpulimit needs a toolchain w/ threads"
22
depends on BR2_USE_MMU
3-
depends on !BR2_TOOLCHAIN_HAS_THREADS || (BR2_or1k && BR2_TOOLCHAIN_USES_MUSL)
3+
depends on !BR2_TOOLCHAIN_HAS_THREADS
44

55
config BR2_PACKAGE_CPULIMIT
66
bool "cpulimit"
77
depends on BR2_USE_MMU # fork()
88
depends on BR2_TOOLCHAIN_HAS_THREADS
9-
depends on !(BR2_or1k && BR2_TOOLCHAIN_USES_MUSL)
109
help
1110
Cpulimit is a tool which limits the CPU usage of a process
1211
(expressed in percentage, not in CPU time)

0 commit comments

Comments
 (0)