summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-crypto/libmcrypt/libmcrypt/0001-fix-parameter-related-unexpected-error-in-gcc-15.0.1.patch119
-rw-r--r--meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb5
2 files changed, 123 insertions, 1 deletions
diff --git a/meta-oe/recipes-crypto/libmcrypt/libmcrypt/0001-fix-parameter-related-unexpected-error-in-gcc-15.0.1.patch b/meta-oe/recipes-crypto/libmcrypt/libmcrypt/0001-fix-parameter-related-unexpected-error-in-gcc-15.0.1.patch
new file mode 100644
index 0000000000..5e2afbab9d
--- /dev/null
+++ b/meta-oe/recipes-crypto/libmcrypt/libmcrypt/0001-fix-parameter-related-unexpected-error-in-gcc-15.0.1.patch
@@ -0,0 +1,119 @@
1From 046d1474a9a367d4b7772233e026855f1b55d58c Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Tue, 1 Apr 2025 17:58:49 +0900
4Subject: [PATCH] fix parameter-related unexpected error in gcc 15.0.1
5
6* see more details: http://errors.yoctoproject.org/Errors/Details/850150/
7 des.c:199:9: error: too many arguments to function 'spinit'; expected 0, have 1
8 199 | spinit(key);
9 | ^~~~~~ ~~~
10 des.c:38:56: note: declared here
11 38 | static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
12 | ^~~~~~
13
14* Move function forward declarations to .h file to fix the following errors:
15 tripledes.c: In function '_mcrypt_desinit':
16 tripledes.c:198:18: error: passing argument 1 of 'perminit' from incompatible pointer type [-Wincompatible-pointer-types]
17 198 | perminit(&key->iperm, ip);
18 | ^~~~~~~~~~~
19 | |
20 | char (*)[16][16][8]
21 In file included from tripledes.c:23:
22 tripledes.h:11:27: note: expected 'char (*)[16][8]' but argument is of type 'char (*)[16][16][8]'
23 11 | static void perminit(char perm[][16][8], char p[64]);
24 | ~~~~~^~~~~~~~~~~~~
25 tripledes.c:199:18: error: passing argument 1 of 'perminit' from incompatible pointer type [-Wincompatible-pointer-types]
26 199 | perminit(&key->fperm, fp);
27 | ^~~~~~~~~~~
28 | |
29 | char (*)[16][16][8]
30 tripledes.h:11:27: note: expected 'char (*)[16][8]' but argument is of type 'char (*)[16][16][8]'
31 11 | static void perminit(char perm[][16][8], char p[64]);
32 | ~~~~~^~~~~~~~~~~~~
33
34 Changed parameter from &key to key
35 perminit(key->iperm, ip);
36 perminit(key->fperm, fp);
37
38Signed-off-by: mark.yang <mark.yang@lge.com>
39
40Upstream-Status: Pending
41---
42 modules/algorithms/des.c | 5 -----
43 modules/algorithms/des.h | 6 ++++++
44 modules/algorithms/tripledes.c | 8 ++------
45 modules/algorithms/tripledes.h | 5 +++++
46 4 files changed, 13 insertions(+), 11 deletions(-)
47
48diff --git a/modules/algorithms/des.c b/modules/algorithms/des.c
49index 5810811..695e740 100644
50--- a/modules/algorithms/des.c
51+++ b/modules/algorithms/des.c
52@@ -35,11 +35,6 @@
53
54 /* #define NULL 0 */
55
56-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
57-perminit_fp();
58-static word32 f();
59-
60-
61 /* Tables defined in the Data Encryption Standard documents */
62
63 /* initial permutation IP */
64diff --git a/modules/algorithms/des.h b/modules/algorithms/des.h
65index c333c5b..65dba63 100644
66--- a/modules/algorithms/des.h
67+++ b/modules/algorithms/des.h
68@@ -5,3 +5,9 @@ typedef struct des_key {
69 char fperm[16][16][8];
70 } DES_KEY;
71
72+static void permute_ip(char *inblock, DES_KEY * key, char *outblock);
73+static void permute_fp(char *inblock, DES_KEY * key, char *outblock);
74+static void perminit_ip(DES_KEY * key);
75+static void spinit(DES_KEY * key);
76+static void perminit_fp(DES_KEY * key);
77+static word32 f(DES_KEY * key, register word32 r, register char *subkey);
78diff --git a/modules/algorithms/tripledes.c b/modules/algorithms/tripledes.c
79index 7b3c324..67985db 100644
80--- a/modules/algorithms/tripledes.c
81+++ b/modules/algorithms/tripledes.c
82@@ -36,10 +36,6 @@
83
84 /* #define NULL 0 */
85
86-static void permute(), perminit(), spinit();
87-static word32 f();
88-
89-
90 /* Tables defined in the Data Encryption Standard documents */
91
92 /* initial permutation IP */
93@@ -199,8 +195,8 @@ static int _mcrypt_desinit(TRIPLEDES_KEY * key)
94 spinit(key, 0);
95 spinit(key, 1);
96 spinit(key, 2);
97- perminit(&key->iperm, ip);
98- perminit(&key->fperm, fp);
99+ perminit(key->iperm, ip);
100+ perminit(key->fperm, fp);
101
102
103 return 0;
104diff --git a/modules/algorithms/tripledes.h b/modules/algorithms/tripledes.h
105index dec7682..10c7bc6 100644
106--- a/modules/algorithms/tripledes.h
107+++ b/modules/algorithms/tripledes.h
108@@ -7,3 +7,8 @@ typedef struct triple_des_key {
109
110 } TRIPLEDES_KEY;
111
112+static void permute(char *inblock, char perm[16][16][8], char *outblock);
113+static void perminit(char perm[16][16][8], char p[64]);
114+static void spinit(TRIPLEDES_KEY * key, int pos);
115+static word32 f(TRIPLEDES_KEY * key, int pos, register word32 r, register char *subkey);
116+
117--
1182.34.1
119
diff --git a/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb b/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb
index a04fafba55..c55a01d3b9 100644
--- a/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb
+++ b/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb
@@ -4,7 +4,10 @@ LICENSE = "LGPL-2.1-only"
4LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff" 4LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
5DEPENDS = "libtool" 5DEPENDS = "libtool"
6 6
7SRC_URI = "${SOURCEFORGE_MIRROR}/project/mcrypt/Libmcrypt/${PV}/libmcrypt-${PV}.tar.gz" 7SRC_URI = " \
8 ${SOURCEFORGE_MIRROR}/project/mcrypt/Libmcrypt/${PV}/libmcrypt-${PV}.tar.gz \
9 file://0001-fix-parameter-related-unexpected-error-in-gcc-15.0.1.patch \
10"
8 11
9SRC_URI[sha256sum] = "e4eb6c074bbab168ac47b947c195ff8cef9d51a211cdd18ca9c9ef34d27a373e" 12SRC_URI[sha256sum] = "e4eb6c074bbab168ac47b947c195ff8cef9d51a211cdd18ca9c9ef34d27a373e"
10 13