diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-03-20 22:01:41 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-03-22 09:10:39 -0700 |
commit | 9323b287ef588f41c13f3520de85eb198f6eaf83 (patch) | |
tree | 428a8381b86d6094961d36b89583b4b2300ee767 | |
parent | 864cea3d642757206fc2f1e07021d881e79b2021 (diff) | |
download | meta-openembedded-9323b287ef588f41c13f3520de85eb198f6eaf83.tar.gz |
libssh: Fix build with clang16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch | 46 | ||||
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh_0.10.4.bb | 1 |
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 0000000000..19775fa529 --- /dev/null +++ b/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 0cade4573334571055127a2d4fe3641e2397948d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 20 Mar 2023 21:59:19 -0700 | ||
4 | Subject: [PATCH] libgcrypt.c: Fix prototype of des3_encrypt/des3_decrypt | ||
5 | |||
6 | This is to match the prototype for callback functions which are now emitted as | ||
7 | errors by clang16 | ||
8 | |||
9 | Fixes | ||
10 | |||
11 | TOPDIR/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 | ^~~~~~~~~~~~ | ||
14 | TOPDIR/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 | |||
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | --- | ||
22 | src/libgcrypt.c | 4 ++-- | ||
23 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/src/libgcrypt.c b/src/libgcrypt.c | ||
26 | index 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 | -- | ||
45 | 2.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 801644d95a..4b2ced5e50 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 | ||
9 | SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ | 9 | SRC_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 | " |
13 | SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85" | 14 | SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85" |