From deb14894eb3fd756471a6945e95f1305fc838c0a Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Jan 31 2022 18:18:17 +0000 Subject: Fix gcc12 compilation issue Signed-off-by: Igor Ivanov --- diff --git a/0001-Fix-gcc12-compilation-issue.patch b/0001-Fix-gcc12-compilation-issue.patch new file mode 100644 index 0000000..5eed55c --- /dev/null +++ b/0001-Fix-gcc12-compilation-issue.patch @@ -0,0 +1,36 @@ +From a42397e377cc2c26a6bb501ee131da63f0a33f45 Mon Sep 17 00:00:00 2001 +From: Igor Ivanov +Date: Mon, 31 Jan 2022 20:01:33 +0200 +Subject: [PATCH] issue: 2945718 Fix gcc12 compilation issue + +C++17 has deprecated a few components that had been in C++ since its beginning, +and std::iterator is one of them. + +Signed-off-by: Igor Ivanov +--- + src/vma/util/vma_list.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/vma/util/vma_list.h b/src/vma/util/vma_list.h +index ae57fba4..9c9b6b38 100644 +--- a/src/vma/util/vma_list.h ++++ b/src/vma/util/vma_list.h +@@ -88,9 +88,14 @@ public : + + template + /* coverity[missing_move_assignment] */ +-class list_iterator_t : public std::iterator ++class list_iterator_t + { + public: ++ using iterator_category = std::random_access_iterator_tag; ++ using value_type = T; ++ using difference_type = std::ptrdiff_t; ++ using pointer = T*; ++ using reference = T&; + + list_iterator_t(T* ptr = NULL) : m_ptr(ptr) {} + +-- +2.27.0 + diff --git a/libvma.spec b/libvma.spec index b771980..beec3dd 100644 --- a/libvma.spec +++ b/libvma.spec @@ -2,12 +2,13 @@ Name: libvma Version: 9.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A library for boosting TCP and UDP traffic (over RDMA hardware) License: GPLv2 or BSD Url: https://github.com/Mellanox/libvma Source0: https://github.com/Mellanox/libvma/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-Fix-gcc12-compilation-issue.patch # libvma currently supports only the following architectures ExclusiveArch: x86_64 ppc64le ppc64 aarch64 @@ -99,6 +100,9 @@ rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/vma %{_mandir}/man8/vma_stats.* %changelog +* Mon Jan 31 2022 Fedora Release Engineering - 9.4.0-3 +- Fix gcc12 compilation issue + * Thu Jan 20 2022 Fedora Release Engineering - 9.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild