From 5c30451ee6dcac805ad53513cd80fecbc4107a665d3a315f03da05a68a989732 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 25 May 2024 08:31:48 +0000 Subject: [PATCH] - Add gcc14.patch OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=321 --- gcc14.patch | 91 +++++++++++++++++++++++++++++++++++++++++++++++ openldap2.changes | 5 +++ openldap2.spec | 3 +- 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 gcc14.patch diff --git a/gcc14.patch b/gcc14.patch new file mode 100644 index 0000000..757ee1c --- /dev/null +++ b/gcc14.patch @@ -0,0 +1,91 @@ +From: Jan Engelhardt +Date: 2024-05-25 09:45:23.081724037 +0200 + +Codefixes needed for gcc 14: + +mdb.c:5115:31: error: assignment to "pthread_key_t" {aka "unsigned int"} from +"void *" makes integer from pointer without a cast [-Wint-conversion] + +Workarounds for: + +constraint.c:560:43: error: assignment to "constraint **" from incompatible pointer type "void **" [-Wincompatible-pointer-types] + for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next ) +dyngroup.c:114:27: error: assignment to "adpair **" from incompatible pointer type "void **" [-Wincompatible-pointer-types] + for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next ) +valsort.c:204:19: error: assignment to "valsort_info **" from incompatible pointer type "void **" [-Wincompatible-pointer-types] + for ( vip = &on->on_bi.bi_private; *vip; vip = &(*vip)->vi_next ) +cloak.c:245:25: error: implicit declaration of function "attr_clean"; did you mean "entry_clean"? [-Wimplicit-function-declaration] + attr_clean( a ); + +--- + contrib/slapd-modules/cloak/cloak.c | 1 + + libraries/liblmdb/mdb.c | 2 +- + servers/slapd/overlays/constraint.c | 2 +- + servers/slapd/overlays/dyngroup.c | 2 +- + servers/slapd/overlays/valsort.c | 2 +- + 5 files changed, 5 insertions(+), 4 deletions(-) + +Index: openldap-2.6.7/contrib/slapd-modules/cloak/cloak.c +=================================================================== +--- openldap-2.6.7.orig/contrib/slapd-modules/cloak/cloak.c ++++ openldap-2.6.7/contrib/slapd-modules/cloak/cloak.c +@@ -242,6 +242,7 @@ cloak_search_response_cb( Operation *op, + else + me->e_attrs = a->a_next; + ++ extern void attr_clean(Attribute *); + attr_clean( a ); + } + +Index: openldap-2.6.7/libraries/liblmdb/mdb.c +=================================================================== +--- openldap-2.6.7.orig/libraries/liblmdb/mdb.c ++++ openldap-2.6.7/libraries/liblmdb/mdb.c +@@ -5161,7 +5161,7 @@ mdb_env_close0(MDB_env *env, int excl) + + // No need to call desctructor anymore, as all pid + // values are cleared below. +- env->me_txkey = NULL; ++ memset(&env->me_txkey, 0, sizeof(env->me_txkey)); + + #ifdef _WIN32 + /* Delete our key from the global list */ +Index: openldap-2.6.7/servers/slapd/overlays/constraint.c +=================================================================== +--- openldap-2.6.7.orig/servers/slapd/overlays/constraint.c ++++ openldap-2.6.7/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; +Index: openldap-2.6.7/servers/slapd/overlays/dyngroup.c +=================================================================== +--- openldap-2.6.7.orig/servers/slapd/overlays/dyngroup.c ++++ openldap-2.6.7/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; +Index: openldap-2.6.7/servers/slapd/overlays/valsort.c +=================================================================== +--- openldap-2.6.7.orig/servers/slapd/overlays/valsort.c ++++ openldap-2.6.7/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) ); diff --git a/openldap2.changes b/openldap2.changes index 528e1c0..995bf18 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat May 25 07:46:05 UTC 2024 - Jan Engelhardt + +- Add gcc14.patch + ------------------------------------------------------------------- Sat May 11 19:27:08 UTC 2024 - Andreas Stieger diff --git a/openldap2.spec b/openldap2.spec index 24de544..8c6892c 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -1,7 +1,7 @@ # # spec file for package openldap2 # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -56,6 +56,7 @@ Patch3: 0003-LDAPI-socket-location.dif Patch5: 0005-pie-compile.dif Patch8: 0008-In-monitor-backend-do-not-return-Connection0-entries.patch Patch16: 0016-Clear-shared-key-only-in-close-function.patch +Patch17: gcc14.patch BuildRequires: argon2-devel BuildRequires: cyrus-sasl-devel BuildRequires: db-devel