diff --git a/0001-eliminate-deprecated-C-function-objects-1331.patch b/dyninst-eliminate-deprecated-C-function-objects-1331.patch similarity index 100% rename from 0001-eliminate-deprecated-C-function-objects-1331.patch rename to dyninst-eliminate-deprecated-C-function-objects-1331.patch diff --git a/dyninst-warning-fix-std-iterator-is-deprecated-1394.patch b/dyninst-warning-fix-std-iterator-is-deprecated-1394.patch new file mode 100644 index 0000000000000000000000000000000000000000..15ff5ae20557b8190d4999d3abc4b636c1054896 --- /dev/null +++ b/dyninst-warning-fix-std-iterator-is-deprecated-1394.patch @@ -0,0 +1,34 @@ +From 55d8a338e362d3aa4448aa9bae776eb90ca1292a Mon Sep 17 00:00:00 2001 +From: "James A. Kupsch" +Date: Thu, 16 Feb 2023 10:11:59 -0600 +Subject: [PATCH] warning fix: std::iterator is deprecated (#1394) + +- replace std::iterator with in class type aliass for required types +--- + symtabAPI/h/Symtab.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/symtabAPI/h/Symtab.h b/symtabAPI/h/Symtab.h +index 7731c1572..bf6d8ab23 100644 +--- a/symtabAPI/h/Symtab.h ++++ b/symtabAPI/h/Symtab.h +@@ -558,9 +558,15 @@ class SYMTAB_EXPORT Symtab : public LookupInterface, + void erase(Symbol* s); + + // Iterator for the symbols. Do not use in parallel. +- class iterator : public std::iterator { ++ class iterator { + master_t::iterator m; + public: ++ using iterator_category = std::forward_iterator_tag; ++ using value_type = Symbol*; ++ using difference_type = std::ptrdiff_t; ++ using pointer = value_type*; ++ using reference = value_type&; ++ + iterator(master_t::iterator i) : m(i) {} + bool operator==(const iterator& x) { return m == x.m; } + bool operator!=(const iterator& x) { return !operator==(x); } +-- +2.21.0.windows.1 + diff --git a/dyninst.spec b/dyninst.spec index ce5b5f440b3302e848576184ab7d82b1b866d33f..06d2dd754e546b6e144c1b577f85e8f1bcd03b8e 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,6 +1,6 @@ Name: dyninst License: LGPLv2+ -Release: 2 +Release: 3 Version: 12.3.0 Summary: An API for Run-time Code Generation ExclusiveArch: x86_64 aarch64 @@ -13,7 +13,8 @@ URL: http://www.dyninst.org Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source1: https://github.com/dyninst/testsuite/archive/v%{testsuite_version}/%{testsuite_base}.tar.gz -Patch1: 0001-eliminate-deprecated-C-function-objects-1331.patch +Patch1: dyninst-eliminate-deprecated-C-function-objects-1331.patch +Patch2: dyninst-warning-fix-std-iterator-is-deprecated-1394.patch BuildRequires: cmake gcc-c++ BuildRequires: binutils-devel boost-devel @@ -52,6 +53,7 @@ dyninst-doc contains API documentation for the Dyninst libraries. pushd %{dyninst_base} %patch 1 -p1 +%patch 2 -p1 popd sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \ @@ -123,6 +125,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf %changelog +* Wed Aug 9 2023 Wenyu Liu - 12.3.0-3 +- warning fix: std::iterator is deprecated + * Thu Jul 20 2023 Wenyu Liu - 12.3.0-2 - eliminate deprecated C++ function objects