diff options
author | Nguyen Dat Tho <tho3.nguyen@lge.com> | 2025-04-03 17:21:20 +0900 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-04-04 19:18:46 -0700 |
commit | eaf94b092d82ce5ed5ab6e4d3e2bf28686f39808 (patch) | |
tree | 7ed4d4bb38009aa9e6f5ec51a63046fb6486dce6 /meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch | |
parent | 14ff80c9dc4090a15cb6ebc849f50683dc0cad5f (diff) | |
download | meta-openembedded-eaf94b092d82ce5ed5ab6e4d3e2bf28686f39808.tar.gz |
udevil: Fix build with gcc-15
Fix error related to "error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]".
Details in https://errors.yoctoproject.org/Errors/Details/850171/
Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch')
-rw-r--r-- | meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch b/meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch new file mode 100644 index 0000000000..bad23327bf --- /dev/null +++ b/meta-filesystems/recipes-utils/udevil/files/Fix-build-with-gcc15.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Fix build with gcc-15 | ||
2 | |||
3 | Fix the following errors: | ||
4 | ../../udevil-0.4.4/src/udevil.c: In function 'command_monitor': | ||
5 | ../../udevil-0.4.4/src/udevil.c:4891:21: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] | ||
6 | 4891 | signal(SIGTERM, command_monitor_finalize ); | ||
7 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
8 | | | | ||
9 | | void (*)(void) | ||
10 | In file included from /home/worker/nano-ai/build-nano-ai/BUILD/work/qcs8550_aihub-webos-linux/udevil/0.4.4/recipe-sysroot/usr/include/sys/wait.h:36, | ||
11 | from ../../udevil-0.4.4/src/udevil.c:10: | ||
12 | /home/worker/nano-ai/build-nano-ai/BUILD/work/qcs8550_aihub-webos-linux/udevil/0.4.4/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' | ||
13 | 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | ||
14 | | ~~~~~~~~~~~~~~~^~~~~~~~~ | ||
15 | ../../udevil-0.4.4/src/udevil.c:4798:6: note: 'command_monitor_finalize' declared here | ||
16 | 4798 | void command_monitor_finalize() | ||
17 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
18 | /home/worker/nano-ai/build-nano-ai/BUILD/work/qcs8550_aihub-webos-linux/udevil/0.4.4/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here | ||
19 | 72 | typedef void (*__sighandler_t) (int); | ||
20 | | ^~~~~~~~~~~~~~ | ||
21 | ... | ||
22 | ../../udevil-0.4.4/src/udevil.c: In function 'main': | ||
23 | ../../udevil-0.4.4/src/udevil.c:5035:22: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] | ||
24 | 5035 | signal( SIGTERM, command_interrupt ); | ||
25 | | ^~~~~~~~~~~~~~~~~ | ||
26 | | | | ||
27 | | void (*)(void) | ||
28 | /home/worker/nano-ai/build-nano-ai/BUILD/work/qcs8550_aihub-webos-linux/udevil/0.4.4/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' | ||
29 | 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | ||
30 | | ~~~~~~~~~~~~~~~^~~~~~~~~ | ||
31 | ../../udevil-0.4.4/src/udevil.c:4916:6: note: 'command_interrupt' declared here | ||
32 | 4916 | void command_interrupt() | ||
33 | | ^~~~~~~~~~~~~~~~~ | ||
34 | /home/worker/nano-ai/build-nano-ai/BUILD/work/qcs8550_aihub-webos-linux/udevil/0.4.4/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here | ||
35 | 72 | typedef void (*__sighandler_t) (int); | ||
36 | | ^~~~~~~~~~~~~~ | ||
37 | ../../udevil-0.4.4/src/udevil.c:5036:22: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] | ||
38 | 5036 | signal( SIGINT, command_interrupt ); | ||
39 | | ^~~~~~~~~~~~~~~~~ | ||
40 | | | | ||
41 | | void (*)(void) | ||
42 | |||
43 | Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com> | ||
44 | |||
45 | Upstream-Status: Inactive-Upstream [lastrelease: 10years ago] | ||
46 | --- | ||
47 | diff --git a/src/udevil.c b/src/udevil.c | ||
48 | index bab80e9..da629d9 100644 | ||
49 | --- a/src/udevil.c | ||
50 | +++ b/src/udevil.c | ||
51 | @@ -4795,7 +4795,7 @@ static int command_info( CommandData* data ) | ||
52 | return ret; | ||
53 | } | ||
54 | |||
55 | -void command_monitor_finalize() | ||
56 | +void command_monitor_finalize(int) | ||
57 | { | ||
58 | //if (signal == SIGINT || signal == SIGTERM) | ||
59 | //printf( "\nudevil: SIGINT || SIGTERM\n"); | ||
60 | @@ -4913,7 +4913,7 @@ finish_: | ||
61 | return 1; | ||
62 | } | ||
63 | |||
64 | -void command_interrupt() | ||
65 | +void command_interrupt(int) | ||
66 | { | ||
67 | if ( udev ) | ||
68 | { | ||