diff options
-rw-r--r-- | meta-oe/recipes-support/cpulimit/cpulimit/0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb | 22 |
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/cpulimit/cpulimit/0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch b/meta-oe/recipes-support/cpulimit/cpulimit/0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch new file mode 100644 index 0000000000..50d0342ec7 --- /dev/null +++ b/meta-oe/recipes-support/cpulimit/cpulimit/0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 41cfba0840f58555593fd4bee07db77221043e0b Mon Sep 17 00:00:00 2001 | ||
2 | From: Portia <stephensportia@gmail.com> | ||
3 | Date: Sun, 1 May 2022 12:43:35 +1000 | ||
4 | Subject: [PATCH] Remove sys/sysctl.h and add missing libgen.h include | ||
5 | |||
6 | - sys/sysctl.h has been deprecated and should be removed | ||
7 | - Adds missing libgen.h include when calling basename() | ||
8 | |||
9 | Upstream-Status: Inactive-Upstream [2015] | ||
10 | Signed-off-by: Portia <stephensportia@gmail.com> | ||
11 | --- | ||
12 | src/cpulimit.c | 1 - | ||
13 | src/process_group.c | 1 + | ||
14 | 2 files changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/cpulimit.c b/src/cpulimit.c | ||
17 | index 50eabea..5b0ec49 100644 | ||
18 | --- a/src/cpulimit.c | ||
19 | +++ b/src/cpulimit.c | ||
20 | @@ -38,7 +38,6 @@ | ||
21 | #include <string.h> | ||
22 | #include <sys/stat.h> | ||
23 | #include <sys/time.h> | ||
24 | -#include <sys/sysctl.h> | ||
25 | #include <sys/resource.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/wait.h> | ||
28 | diff --git a/src/process_group.c b/src/process_group.c | ||
29 | index 06d73a6..d4f6fab 100644 | ||
30 | --- a/src/process_group.c | ||
31 | +++ b/src/process_group.c | ||
32 | @@ -24,6 +24,7 @@ | ||
33 | #include <limits.h> | ||
34 | #include <sys/time.h> | ||
35 | #include <signal.h> | ||
36 | +#include <libgen.h> | ||
37 | |||
38 | #include <assert.h> | ||
39 | |||
40 | -- | ||
41 | 2.25.1 | ||
diff --git a/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb b/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb new file mode 100644 index 0000000000..3ee2b5c239 --- /dev/null +++ b/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "cpulimit is a tool which limits the CPU usage of a process" | ||
2 | HOMEPAGE = "http://cpulimit.sourceforge.net" | ||
3 | LICENSE = "GPL-2.0-or-later" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86c1c0d961a437e529db93aa3bb32dc4" | ||
5 | SRCREV ?= "f4d2682804931e7aea02a869137344bb5452a3cd" | ||
6 | |||
7 | SRC_URI = "git://g...@github.com/opsengine/cpulimit.git;protocol=https;branch=master \ | ||
8 | file://0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch \ | ||
9 | " | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | do_compile() { | ||
14 | oe_runmake all | ||
15 | } | ||
16 | do_install() { | ||
17 | install -d ${D}${sbindir} | ||
18 | install -m 0755 ${B}/src/${PN} ${D}${sbindir}/ | ||
19 | } | ||
20 | |||
21 | CFLAGS += "${LDFLAGS}" | ||
22 | |||