commit: 53a05191c8e61d028b7dc6c23bea5e203c334368 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> AuthorDate: Mon Aug 18 05:59:07 2025 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Mon Aug 18 05:59:07 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53a05191
dev-libs/nss: fix 3.115's lto issues with a patch Closes: https://bugs.gentoo.org/961575 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> ...9-align-sftkdb_known_attributes_size-type.patch | 46 ++++++++++++++++++++++ dev-libs/nss/nss-3.115.ebuild | 1 + 2 files changed, 47 insertions(+) diff --git a/dev-libs/nss/files/nss-3.115-bmo-1983399-align-sftkdb_known_attributes_size-type.patch b/dev-libs/nss/files/nss-3.115-bmo-1983399-align-sftkdb_known_attributes_size-type.patch new file mode 100644 index 000000000000..958599927e91 --- /dev/null +++ b/dev-libs/nss/files/nss-3.115-bmo-1983399-align-sftkdb_known_attributes_size-type.patch @@ -0,0 +1,46 @@ +From 66f55acef3b683134970300ab4c4dfee578a4a3b Mon Sep 17 00:00:00 2001 +From: Nicholas Vinson <[email protected]> +Date: Sun, 17 Aug 2025 00:26:37 -0400 +Subject: [PATCH] lib/softtoken/{sdb.c,sftkdbti.h}: Align + sftkdb_known_attributes_size type + +sftkdb_known_attributes_size is defined with conflicting types. In +/lib/softtoken/sdb.c it is defined as a 'const size_t'; whereas in +lib/softtoken/sftkdbti.h it is defined as an 'unsigned int'. The correct +type for sftkdb_known_attributes_size is size_t since its value is +derived from the size of the sftkdb_known_attributes array. + +Fixes: 1983399 + +Signed-off-by: Nicholas Vinson <[email protected]> +--- + lib/softoken/sdb.c | 2 +- + lib/softoken/sftkdbti.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/softoken/sdb.c b/lib/softoken/sdb.c +index 8b5ce70e30..022164a1f4 100644 +--- a/lib/softoken/sdb.c ++++ b/lib/softoken/sdb.c +@@ -158,7 +158,7 @@ const CK_ATTRIBUTE_TYPE sftkdb_known_attributes[] = { + }; + // clang-format on + +-const int sftkdb_known_attributes_size = PR_ARRAY_SIZE(sftkdb_known_attributes); ++const size_t sftkdb_known_attributes_size = PR_ARRAY_SIZE(sftkdb_known_attributes); + + /* + * Note on use of sqlReadDB: Only one thread at a time may have an actual +diff --git a/lib/softoken/sftkdbti.h b/lib/softoken/sftkdbti.h +index c08334919d..7dfbdabf1c 100644 +--- a/lib/softoken/sftkdbti.h ++++ b/lib/softoken/sftkdbti.h +@@ -27,7 +27,7 @@ struct SFTKDBHandleStr { + }; + + extern const CK_ATTRIBUTE_TYPE sftkdb_known_attributes[]; +-extern unsigned int sftkdb_known_attributes_size; ++extern size_t sftkdb_known_attributes_size; + + #define SFTK_KEYDB_TYPE 0x40000000 + #define SFTK_CERTDB_TYPE 0x00000000 diff --git a/dev-libs/nss/nss-3.115.ebuild b/dev-libs/nss/nss-3.115.ebuild index 9fbc0789edf0..9c60530ba3d9 100644 --- a/dev-libs/nss/nss-3.115.ebuild +++ b/dev-libs/nss/nss-3.115.ebuild @@ -43,6 +43,7 @@ PATCHES=( "${FILESDIR}"/nss-3.103-gentoo-fixes-add-pkgconfig-files.patch "${FILESDIR}"/nss-3.21-gentoo-fixup-warnings.patch "${FILESDIR}"/nss-3.87-use-clang-as-bgo892686.patch + "${FILESDIR}"/nss-3.115-bmo-1983399-align-sftkdb_known_attributes_size-type.patch ) src_prepare() {
