summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/cpulimit/cpulimit/0002-busy.c-Fix-incompatible-pointer-type-error.patch51
-rw-r--r--meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/cpulimit/cpulimit/0002-busy.c-Fix-incompatible-pointer-type-error.patch b/meta-oe/recipes-support/cpulimit/cpulimit/0002-busy.c-Fix-incompatible-pointer-type-error.patch
new file mode 100644
index 0000000000..c75cbe1950
--- /dev/null
+++ b/meta-oe/recipes-support/cpulimit/cpulimit/0002-busy.c-Fix-incompatible-pointer-type-error.patch
@@ -0,0 +1,51 @@
1From 86b71c49a373f78920d78c0e88f530f476b4fe70 Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Wed, 26 Mar 2025 15:57:54 +0900
4Subject: [PATCH] busy.c: Fix incompatible pointer type error.
5
6Error occurs in gcc 15.0.1 environment.
7busy.c: In function 'main':
8busy.c:20:58: error: passing argument 3 of 'pthread_create' from incompatible pointer type [-Wincompatible-pointer-types]
9 20 | if ((ret = pthread_create(&thread, NULL, loop, NULL)) != 0)
10 | ^~~~
11 | |
12 | void * (*)(void)
13In file included from busy.c:3:
14recipe-sysroot/usr/include/pthread.h:204:36: note: expected 'void * (*)(void *)' but argument is of type 'void * (*)(void)'
15 204 | void *(*__start_routine) (void *),
16 | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
17busy.c:6:7: note: 'loop' declared here
18 6 | void *loop()
19 | ^~~~
20
21Set loop parameter to void* since it requires void* type argument.
22
23Signed-off-by: mark.yang <mark.yang@lge.com>
24
25Upstream-Status: Inactive-Upstream [lastcommit: 9 Years ago and lastrelease: 9 Years ago]
26---
27 tests/busy.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/tests/busy.c b/tests/busy.c
31index b3afb7c..2d726eb 100644
32--- a/tests/busy.c
33+++ b/tests/busy.c
34@@ -3,7 +3,7 @@
35 #include <pthread.h>
36 #include <unistd.h>
37
38-void *loop()
39+void *loop(void *arg)
40 {
41 while(1);
42 }
43@@ -23,7 +23,7 @@ int main(int argc, char **argv) {
44 exit(1);
45 }
46 }
47- loop();
48+ loop(NULL);
49 return 0;
50 }
51 \ No newline at end of file
diff --git a/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb b/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb
index f88d3b6ca1..ee2f91343e 100644
--- a/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb
+++ b/meta-oe/recipes-support/cpulimit/cpulimit_0.2.bb
@@ -7,6 +7,7 @@ SRCREV ?= "f4d2682804931e7aea02a869137344bb5452a3cd"
7 7
8SRC_URI = "git://github.com/opsengine/cpulimit.git;protocol=https;branch=master \ 8SRC_URI = "git://github.com/opsengine/cpulimit.git;protocol=https;branch=master \
9 file://0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch \ 9 file://0001-Remove-sys-sysctl.h-and-add-missing-libgen.h-include.patch \
10 file://0002-busy.c-Fix-incompatible-pointer-type-error.patch \
10 " 11 "
11 12
12S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"