diff options
-rw-r--r-- | meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch | 65 | ||||
-rw-r--r-- | meta-oe/recipes-support/openct/openct_0.6.20.bb | 1 |
2 files changed, 66 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch b/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch new file mode 100644 index 0000000000..73c9d06667 --- /dev/null +++ b/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From c4351058da555e1e6a2b4b15d913baee80f55865 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wang Mingyu <wangmy@fujitsu.com> | ||
3 | Date: Thu, 27 Jun 2024 06:27:18 +0000 | ||
4 | Subject: Fix incompatible pointer type error with gcc option | ||
5 | -Wincompatible-pointer-types | ||
6 | |||
7 | | ../../../openct-0.6.20/src/ifd/ifdhandler.c: In function 'ifdhandler_run': | ||
8 | | ../../../openct-0.6.20/src/ifd/ifdhandler.c:239:52: error: passing argument 2 of 'ifd_get_eventfd' from incompatible pointer type [-Wincompatible-pointer-types] | ||
9 | | 239 | sock->fd = ifd_get_eventfd(reader, &sock->events); | ||
10 | | | ^~~~~~~~~~~~~ | ||
11 | | | | | ||
12 | | | int * | ||
13 | | In file included from ../../../openct-0.6.20/src/ifd/internal.h:17, | ||
14 | | from ../../../openct-0.6.20/src/ifd/ifdhandler.c:7: | ||
15 | | ../../../openct-0.6.20/src/include/openct/ifd.h:182:65: note: expected 'short int *' but argument is of type 'int *' | ||
16 | | 182 | extern int ifd_get_eventfd(ifd_reader_t *, short *); | ||
17 | | | ^~~~~~~ | ||
18 | |||
19 | | ../../../openct-0.6.20/src/ifd/process.c: In function 'do_memory_write': | ||
20 | | ../../../openct-0.6.20/src/ifd/process.c:461:61: error: passing argument 4 of 'ct_tlv_get_opaque' from incompatible pointer type [-Wincompatible-pointer-types] | ||
21 | | 461 | || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, &data_len)) | ||
22 | | | ^~~~~~~~~ | ||
23 | | | | | ||
24 | | | unsigned int * | ||
25 | | In file included from ../../../openct-0.6.20/src/ifd/process.c:20: | ||
26 | | ../../../openct-0.6.20/src/include/openct/tlv.h:40:62: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *' | ||
27 | | 40 | ifd_tag_t, unsigned char **, size_t *); | ||
28 | |||
29 | Upstream-Status: Submitted | ||
30 | |||
31 | Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> | ||
32 | --- | ||
33 | src/ifd/ifdhandler.c | 2 +- | ||
34 | src/ifd/process.c | 2 +- | ||
35 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
36 | |||
37 | diff --git a/src/ifd/ifdhandler.c b/src/ifd/ifdhandler.c | ||
38 | index 12686c9..ebd1b53 100644 | ||
39 | --- a/src/ifd/ifdhandler.c | ||
40 | +++ b/src/ifd/ifdhandler.c | ||
41 | @@ -236,7 +236,7 @@ static void ifdhandler_run(ifd_reader_t * reader) | ||
42 | sock->fd = -1; | ||
43 | } | ||
44 | else { | ||
45 | - sock->fd = ifd_get_eventfd(reader, &sock->events); | ||
46 | + sock->fd = ifd_get_eventfd(reader, (short int *)&sock->events); | ||
47 | } | ||
48 | if (sock->fd == -1) { | ||
49 | ifd_debug(1, "events inactive for reader %s", reader->name); | ||
50 | diff --git a/src/ifd/process.c b/src/ifd/process.c | ||
51 | index 4563bdf..7088a76 100644 | ||
52 | --- a/src/ifd/process.c | ||
53 | +++ b/src/ifd/process.c | ||
54 | @@ -458,7 +458,7 @@ static int do_memory_write(ifd_reader_t * reader, int unit, | ||
55 | return IFD_ERROR_INVALID_SLOT; | ||
56 | |||
57 | if (ct_tlv_get_int(args, CT_TAG_ADDRESS, &address) == 0 | ||
58 | - || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, &data_len)) | ||
59 | + || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, (size_t *)&data_len)) | ||
60 | return IFD_ERROR_MISSING_ARG; | ||
61 | |||
62 | rc = ifd_card_write_memory(reader, unit, address, data, data_len); | ||
63 | -- | ||
64 | 2.34.1 | ||
65 | |||
diff --git a/meta-oe/recipes-support/openct/openct_0.6.20.bb b/meta-oe/recipes-support/openct/openct_0.6.20.bb index e4b99089f5..e013fb26e8 100644 --- a/meta-oe/recipes-support/openct/openct_0.6.20.bb +++ b/meta-oe/recipes-support/openct/openct_0.6.20.bb | |||
@@ -18,6 +18,7 @@ SRC_URI = " \ | |||
18 | file://openct.init \ | 18 | file://openct.init \ |
19 | file://openct.sysconfig \ | 19 | file://openct.sysconfig \ |
20 | file://openct.service \ | 20 | file://openct.service \ |
21 | file://0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | SRC_URI[md5sum] = "a1da3358ab798f1cb9232f1dbababc21" | 24 | SRC_URI[md5sum] = "a1da3358ab798f1cb9232f1dbababc21" |