diff options
Diffstat (limited to 'meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch')
-rw-r--r-- | meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch b/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch new file mode 100644 index 000000000..e6ab4e5a4 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 634017950c1c920d0de63fffa5c52e621de1d603 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wang Mingyu <wangmy@fujitsu.com> | ||
3 | Date: Wed, 26 Jun 2024 07:41:01 +0000 | ||
4 | Subject: Fix incompatible pointer type error with gcc option | ||
5 | -Wincompatible-pointer-types | ||
6 | |||
7 | lib32-openldap do_compile failure with gcc-14: | ||
8 | | tls_g.c:971:57: error: passing argument 4 of 'gnutls_fingerprint' from incompatible pointer type [-Wincompatible-pointer-types] | ||
9 | | 971 | keyhash.bv_val, &keyhash.bv_len ) < 0 ) { | ||
10 | | | ^~~~~~~~~~~~~~~ | ||
11 | | | | | ||
12 | | | ber_len_t * {aka long unsigned int *} | ||
13 | | In file included from tls_g.c:44: | ||
14 | | /usr/include/gnutls/gnutls.h:2406:32: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'ber_len_t *' {aka 'long unsigned int *'} | ||
15 | | 2406 | size_t *result_size); | ||
16 | | | ^~~ | ||
17 | |||
18 | Upstream-Status: Submitted | ||
19 | |||
20 | Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> | ||
21 | --- | ||
22 | libraries/libldap/tls_g.c | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c | ||
26 | index 7c23875..b4b487d 100644 | ||
27 | --- a/libraries/libldap/tls_g.c | ||
28 | +++ b/libraries/libldap/tls_g.c | ||
29 | @@ -968,7 +968,7 @@ tlsg_session_pinning( LDAP *ld, tls_session *sess, char *hashalg, struct berval | ||
30 | keyhash.bv_len = gnutls_hash_get_len( alg ); | ||
31 | keyhash.bv_val = LDAP_MALLOC( keyhash.bv_len ); | ||
32 | if ( !keyhash.bv_val || gnutls_fingerprint( alg, &key, | ||
33 | - keyhash.bv_val, &keyhash.bv_len ) < 0 ) { | ||
34 | + keyhash.bv_val, (size_t *)&keyhash.bv_len ) < 0 ) { | ||
35 | goto done; | ||
36 | } | ||
37 | } else { | ||
38 | -- | ||
39 | 2.34.1 | ||
40 | |||