summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libssh
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-03-20 22:01:41 -0700
committerKhem Raj <raj.khem@gmail.com>2023-03-22 09:10:39 -0700
commit9323b287ef588f41c13f3520de85eb198f6eaf83 (patch)
tree428a8381b86d6094961d36b89583b4b2300ee767 /meta-oe/recipes-support/libssh
parent864cea3d642757206fc2f1e07021d881e79b2021 (diff)
downloadmeta-openembedded-9323b287ef588f41c13f3520de85eb198f6eaf83.tar.gz
libssh: Fix build with clang16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/libssh')
-rw-r--r--meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch46
-rw-r--r--meta-oe/recipes-support/libssh/libssh_0.10.4.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch b/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch
new file mode 100644
index 000000000..19775fa52
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch
@@ -0,0 +1,46 @@
1From 0cade4573334571055127a2d4fe3641e2397948d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 20 Mar 2023 21:59:19 -0700
4Subject: [PATCH] libgcrypt.c: Fix prototype of des3_encrypt/des3_decrypt
5
6This is to match the prototype for callback functions which are now emitted as
7errors by clang16
8
9Fixes
10
11TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:903:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types]
12 .encrypt = des3_encrypt,
13 ^~~~~~~~~~~~
14TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:904:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types]
15 .decrypt = des3_decrypt
16 ^~~~~~~~~~~~
17
18Upstream-Status: Pending
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 src/libgcrypt.c | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/src/libgcrypt.c b/src/libgcrypt.c
26index da5588ad..e482b654 100644
27--- a/src/libgcrypt.c
28+++ b/src/libgcrypt.c
29@@ -469,12 +469,12 @@ static int des3_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) {
30 }
31
32 static void des3_encrypt(struct ssh_cipher_struct *cipher, void *in,
33- void *out, unsigned long len) {
34+ void *out, size_t len) {
35 gcry_cipher_encrypt(cipher->key[0], out, len, in, len);
36 }
37
38 static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in,
39- void *out, unsigned long len) {
40+ void *out, size_t len) {
41 gcry_cipher_decrypt(cipher->key[0], out, len, in, len);
42 }
43
44--
452.40.0
46
diff --git a/meta-oe/recipes-support/libssh/libssh_0.10.4.bb b/meta-oe/recipes-support/libssh/libssh_0.10.4.bb
index 801644d95..4b2ced5e5 100644
--- a/meta-oe/recipes-support/libssh/libssh_0.10.4.bb
+++ b/meta-oe/recipes-support/libssh/libssh_0.10.4.bb
@@ -8,6 +8,7 @@ DEPENDS = "zlib openssl"
8 8
9SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ 9SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \
10 file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ 10 file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \
11 file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \
11 file://run-ptest \ 12 file://run-ptest \
12 " 13 "
13SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85" 14SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85"