summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-08-25 11:02:30 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2024-08-25 13:00:31 -0700
commit5fffb10e6238d9e572ce84bb2b6fdd922eacdfcf (patch)
treecd8d3d93fdad0a90082d88af952fb014ac78546e /net-nds
parentapp-admin/mkosi: add 24.3 (diff)
downloadgentoo-5fffb10e6238d9e572ce84bb2b6fdd922eacdfcf.tar.gz
gentoo-5fffb10e6238d9e572ce84bb2b6fdd922eacdfcf.tar.bz2
gentoo-5fffb10e6238d9e572ce84bb2b6fdd922eacdfcf.zip
net-nds/openldap: fix more -Werror=incompatible-pointer-types cases
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://bugs.gentoo.org/show_bug.cgi?id=933875
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/openldap/files/openldap-2.6.x-gnutls-pointer-error.patch40
-rw-r--r--net-nds/openldap/files/openldap-2.6.x-slapd-pointer-types.patch71
-rw-r--r--net-nds/openldap/openldap-2.5.18.ebuild4
-rw-r--r--net-nds/openldap/openldap-2.6.6-r2.ebuild2
-rw-r--r--net-nds/openldap/openldap-2.6.8.ebuild4
5 files changed, 119 insertions, 2 deletions
diff --git a/net-nds/openldap/files/openldap-2.6.x-gnutls-pointer-error.patch b/net-nds/openldap/files/openldap-2.6.x-gnutls-pointer-error.patch
new file mode 100644
index 000000000000..e6ab4e5a46cb
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.6.x-gnutls-pointer-error.patch
@@ -0,0 +1,40 @@
+From 634017950c1c920d0de63fffa5c52e621de1d603 Mon Sep 17 00:00:00 2001
+From: Wang Mingyu <wangmy@fujitsu.com>
+Date: Wed, 26 Jun 2024 07:41:01 +0000
+Subject: Fix incompatible pointer type error with gcc option
+ -Wincompatible-pointer-types
+
+lib32-openldap do_compile failure with gcc-14:
+| tls_g.c:971:57: error: passing argument 4 of 'gnutls_fingerprint' from incompatible pointer type [-Wincompatible-pointer-types]
+| 971 | keyhash.bv_val, &keyhash.bv_len ) < 0 ) {
+| | ^~~~~~~~~~~~~~~
+| | |
+| | ber_len_t * {aka long unsigned int *}
+| In file included from tls_g.c:44:
+| /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 *'}
+| 2406 | size_t *result_size);
+| | ^~~
+
+Upstream-Status: Submitted
+
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
+---
+ libraries/libldap/tls_g.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c
+index 7c23875..b4b487d 100644
+--- a/libraries/libldap/tls_g.c
++++ b/libraries/libldap/tls_g.c
+@@ -968,7 +968,7 @@ tlsg_session_pinning( LDAP *ld, tls_session *sess, char *hashalg, struct berval
+ keyhash.bv_len = gnutls_hash_get_len( alg );
+ keyhash.bv_val = LDAP_MALLOC( keyhash.bv_len );
+ if ( !keyhash.bv_val || gnutls_fingerprint( alg, &key,
+- keyhash.bv_val, &keyhash.bv_len ) < 0 ) {
++ keyhash.bv_val, (size_t *)&keyhash.bv_len ) < 0 ) {
+ goto done;
+ }
+ } else {
+--
+2.34.1
+
diff --git a/net-nds/openldap/files/openldap-2.6.x-slapd-pointer-types.patch b/net-nds/openldap/files/openldap-2.6.x-slapd-pointer-types.patch
new file mode 100644
index 000000000000..9f79048645d6
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.6.x-slapd-pointer-types.patch
@@ -0,0 +1,71 @@
+# https://git.openldap.org/openldap/openldap/-/commit/fb9e6a81bbee880549e7ec18f0a74ddddbd2d1ab.patch
+From fb9e6a81bbee880549e7ec18f0a74ddddbd2d1ab Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh@redhat.com>
+Date: Tue, 6 Feb 2024 21:38:24 -0500
+Subject: [PATCH] ITS#10171 - Explicitly cast private values
+
+Fixes issues with -Werror=incompatible-pointer-types
+
+Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
+---
+ servers/slapd/config.c | 2 +-
+ servers/slapd/overlays/constraint.c | 2 +-
+ servers/slapd/overlays/dyngroup.c | 2 +-
+ servers/slapd/overlays/valsort.c | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/servers/slapd/config.c b/servers/slapd/config.c
+index 80333f359c..987c862d91 100644
+--- a/servers/slapd/config.c
++++ b/servers/slapd/config.c
+@@ -151,7 +151,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) {
+ int rc, arg_user, arg_type, arg_syn, iarg;
+ unsigned uiarg;
+ long larg;
+- size_t ularg;
++ unsigned long ularg;
+ ber_len_t barg;
+
+ if(Conf->arg_type == ARG_IGNORED) {
+diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c
+index f939b37762..0d6156af4d 100644
+--- a/servers/slapd/overlays/constraint.c
++++ b/servers/slapd/overlays/constraint.c
+@@ -557,7 +557,7 @@ done:;
+ a2->restrict_filter = ap.restrict_filter;
+ a2->restrict_val = ap.restrict_val;
+
+- for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next )
++ for ( app = (constraint **)&on->on_bi.bi_private; *app; app = &(*app)->ap_next )
+ /* Get to the end */ ;
+
+ a2->ap_next = *app;
+diff --git a/servers/slapd/overlays/dyngroup.c b/servers/slapd/overlays/dyngroup.c
+index 5d890d6650..e0e70af2d9 100644
+--- a/servers/slapd/overlays/dyngroup.c
++++ b/servers/slapd/overlays/dyngroup.c
+@@ -111,7 +111,7 @@ static int dgroup_cf( ConfigArgs *c )
+ */
+ a2 = ch_malloc( sizeof(adpair) );
+
+- for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next )
++ for ( app = (adpair **)&on->on_bi.bi_private; *app; app = &(*app)->ap_next )
+ /* Get to the end */ ;
+
+ a2->ap_mem = ap.ap_mem;
+diff --git a/servers/slapd/overlays/valsort.c b/servers/slapd/overlays/valsort.c
+index 3d998e2fcb..e251500d0b 100644
+--- a/servers/slapd/overlays/valsort.c
++++ b/servers/slapd/overlays/valsort.c
+@@ -201,7 +201,7 @@ valsort_cf_func(ConfigArgs *c) {
+ return(1);
+ }
+
+- for ( vip = &on->on_bi.bi_private; *vip; vip = &(*vip)->vi_next )
++ for ( vip = (valsort_info **)&on->on_bi.bi_private; *vip; vip = &(*vip)->vi_next )
+ /* Get to the end */ ;
+
+ vi = ch_malloc( sizeof(valsort_info) );
+--
+GitLab
+
diff --git a/net-nds/openldap/openldap-2.5.18.ebuild b/net-nds/openldap/openldap-2.5.18.ebuild
index 150d0a95e6ca..48748317f4b5 100644
--- a/net-nds/openldap/openldap-2.5.18.ebuild
+++ b/net-nds/openldap/openldap-2.5.18.ebuild
@@ -140,6 +140,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.6.1-system-mdb.patch
"${FILESDIR}"/${PN}-2.6.1-cloak.patch
"${FILESDIR}"/${PN}-2.6.1-flags.patch
+ "${FILESDIR}"/${PN}-2.6.x-gnutls-pointer-error.patch
+ #"${FILESDIR}"/${PN}-2.6.x-slapd-pointer-types.patch # needs backport
)
openldap_filecount() {
@@ -417,7 +419,7 @@ multilib_src_configure() {
# error: passing argument 3 of ‘ldap_bv2rdn’ from incompatible pointer type
# [-Wincompatible-pointer-types]
# expected ‘char **’ but argument is of type ‘const char **’
- append-flags $(test-flags-CC -Wno-error=incompatible-pointer-types)
+ #append-flags $(test-flags-CC -Wno-error=incompatible-pointer-types)
if use experimental ; then
# connectionless ldap per bug #342439
diff --git a/net-nds/openldap/openldap-2.6.6-r2.ebuild b/net-nds/openldap/openldap-2.6.6-r2.ebuild
index e748df009fdf..f63e7a4effc9 100644
--- a/net-nds/openldap/openldap-2.6.6-r2.ebuild
+++ b/net-nds/openldap/openldap-2.6.6-r2.ebuild
@@ -149,6 +149,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.6.1-flags.patch
"${FILESDIR}"/${PN}-2.6.1-fix-missing-mapping.patch
"${FILESDIR}"/${PN}-2.6.6-fix-type-mismatch-lloadd.patch
+ "${FILESDIR}"/${PN}-2.6.x-gnutls-pointer-error.patch
+ "${FILESDIR}"/${PN}-2.6.x-slapd-pointer-types.patch
)
openldap_filecount() {
diff --git a/net-nds/openldap/openldap-2.6.8.ebuild b/net-nds/openldap/openldap-2.6.8.ebuild
index 61f2eedf6751..d8034c51fae3 100644
--- a/net-nds/openldap/openldap-2.6.8.ebuild
+++ b/net-nds/openldap/openldap-2.6.8.ebuild
@@ -149,6 +149,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.6.1-flags.patch
"${FILESDIR}"/${PN}-2.6.1-fix-missing-mapping.patch
#"${FILESDIR}"/${PN}-2.6.6-fix-type-mismatch-lloadd.patch
+ "${FILESDIR}"/${PN}-2.6.x-gnutls-pointer-error.patch
+ #"${FILESDIR}"/${PN}-2.6.x-slapd-pointer-types.patch # included upstream
)
openldap_filecount() {
@@ -417,7 +419,7 @@ multilib_src_configure() {
# error: passing argument 3 of ‘ldap_bv2rdn’ from incompatible pointer type [-Wincompatible-pointer-types]
# expected ‘char **’ but argument is of type ‘const char **’
- append-flags $(test-flags-CC -Wno-error=incompatible-pointer-types)
+ #append-flags $(test-flags-CC -Wno-error=incompatible-pointer-types)
if use experimental ; then
# connectionless ldap per bug #342439