diff --git a/libpsm2-gcc16-fixes.patch b/libpsm2-gcc16-fixes.patch new file mode 100644 index 0000000..50c12bf --- /dev/null +++ b/libpsm2-gcc16-fixes.patch @@ -0,0 +1,31 @@ +commit ae8ed797f23b904a80d054ef10e286abe854a3ba +Author: Nicolas Morey +Date: Tue Jan 20 13:50:57 2026 +0100 + + libpsm2: gcc16 fixes + + Signed-off-by: Nicolas Morey + +diff --git psm_mpool.c psm_mpool.c +index e36e91724333..2a42e6e12287 100644 +--- psm_mpool.c ++++ psm_mpool.c +@@ -435,8 +435,6 @@ void psmi_mpool_chunk_dealloc(mpool_t mp, int idx) + void psmi_mpool_destroy(mpool_t mp) + { + int i = 0; +- size_t nbytes = mp->mp_num_obj * mp->mp_elm_size; +- + for (i = 0; i < mp->mp_elm_vector_size; i++) { + if (mp->mp_elm_vector[i]) { + #ifdef PSM_CUDA +@@ -447,9 +445,7 @@ void psmi_mpool_destroy(mpool_t mp) + } + } + psmi_free(mp->mp_elm_vector); +- nbytes += mp->mp_elm_vector_size * sizeof(struct mpool_element *); + psmi_free(mp); +- nbytes += sizeof(struct mpool); + } + + /** diff --git a/libpsm2.changes b/libpsm2.changes index bc3f94e..ca11a8f 100644 --- a/libpsm2.changes +++ b/libpsm2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 20 12:53:12 UTC 2026 - Nicolas Morey + +- Add patch to fix compilation with GCC 16 (bsc#1256971): + - libpsm2-gcc16-fixes.patch + ------------------------------------------------------------------- Fri Jul 4 06:43:53 UTC 2025 - Nicolas Morey diff --git a/libpsm2.spec b/libpsm2.spec index 1dfb7c3..98fe8b4 100644 --- a/libpsm2.spec +++ b/libpsm2.spec @@ -38,6 +38,7 @@ Source100: README.md Patch2: libpsm2-use_RPM_OPT_FLAGS.patch Patch3: libpsm2-use-exported-variable-for-version-and-release.patch Patch4: libpsm2-disable-AVX.patch +Patch5: libpsm2-gcc16-fixes.patch BuildRequires: libnuma-devel BuildRequires: libuuid-devel BuildRequires: pkgconfig