diff options
Diffstat (limited to 'meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch')
-rw-r--r-- | meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch b/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch new file mode 100644 index 0000000000..3b2e9502ae --- /dev/null +++ b/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 3f1f2d143a1e365bb0451609d08194756951099a Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Tue, 22 Apr 2025 18:03:24 +0000 | ||
4 | Subject: [PATCH] ltp-pan: fix wait_handler declaration | ||
5 | |||
6 | to match definition in: | ||
7 | tools/ltp-pan/ltp-pan.c:wait_handler( int sig ) | ||
8 | |||
9 | * fixes build with gcc-15: | ||
10 | http://errors.yoctoproject.org/Errors/Details/852857/ | ||
11 | |||
12 | ltp-pan.c: In function 'main': | ||
13 | ltp-pan.c:459:19: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] | ||
14 | 459 | sa.sa_handler = wait_handler; | ||
15 | | ^ | ||
16 | In file included from ltp-pan.c:67: | ||
17 | zoolib.h:52:6: note: 'wait_handler' declared here | ||
18 | 52 | void wait_handler(); | ||
19 | | ^~~~~~~~~~~~ | ||
20 | In file included from TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/sys/param.h:28, | ||
21 | from ltp-pan.c:56: | ||
22 | TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here | ||
23 | 72 | typedef void (*__sighandler_t) (int); | ||
24 | | ^~~~~~~~~~~~~~ | ||
25 | ltp-pan.c:489:17: error: too many arguments to function 'wait_handler'; expected 0, have 1 | ||
26 | 489 | wait_handler(SIGINT); | ||
27 | | ^~~~~~~~~~~~ ~~~~~~ | ||
28 | |||
29 | Upstream-Status: Submitted [https://github.com/andikleen/mce-test/pull/9] | ||
30 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
31 | --- | ||
32 | tools/ltp-pan/zoolib.h | 2 +- | ||
33 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
34 | |||
35 | diff --git a/tools/ltp-pan/zoolib.h b/tools/ltp-pan/zoolib.h | ||
36 | index 8b4049e..34ce76f 100644 | ||
37 | --- a/tools/ltp-pan/zoolib.h | ||
38 | +++ b/tools/ltp-pan/zoolib.h | ||
39 | @@ -49,7 +49,7 @@ extern char zoo_error[ZELEN]; | ||
40 | int lock_file( FILE *fp, short ltype, char **errmsg ); | ||
41 | /* FILE *open_file( char *file, char *mode, char **errmsg ); */ | ||
42 | |||
43 | -void wait_handler(); | ||
44 | +void wait_handler(int sig); | ||
45 | |||
46 | /* char *zoo_active( void ); */ | ||
47 | /* zoo_getname(): create a filename to use for the zoo | ||