summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-02-06 18:37:12 -0800
committerKhem Raj <raj.khem@gmail.com>2023-02-06 20:48:39 -0800
commit26fb498ed3c980ea69913ce86edcd7e659095f1a (patch)
tree3447583f046765863d686353db63d99388918c47 /meta-oe/recipes-kernel
parentac69a017011bf14fcd45cd653e1c1c6396884e8e (diff)
downloadmeta-openembedded-26fb498ed3c980ea69913ce86edcd7e659095f1a.tar.gz
oprofile: Do not use std::bind2nd
std::bind2nd is removed from c++17, therefore re-implement with generic lambda Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r--meta-oe/recipes-kernel/oprofile/oprofile/0001-Replace-std-bind2nd-with-generic-lambda.patch34
-rw-r--r--meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0001-Replace-std-bind2nd-with-generic-lambda.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0001-Replace-std-bind2nd-with-generic-lambda.patch
new file mode 100644
index 000000000..930b90e28
--- /dev/null
+++ b/meta-oe/recipes-kernel/oprofile/oprofile/0001-Replace-std-bind2nd-with-generic-lambda.patch
@@ -0,0 +1,34 @@
1From 5d879cb4f23c613e16b3f479ab09bbb5ff340201 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Feb 2023 17:02:41 -0800
4Subject: [PATCH] Replace std::bind2nd with generic lambda
5
6std::bind2nd is gone in c++17, therefore stop using it and replace it
7with generic lambda from c++14 onwards
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 libutil++/growable_vector.h | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15diff --git a/libutil++/growable_vector.h b/libutil++/growable_vector.h
16index 350246a..9846e1e 100644
17--- a/libutil++/growable_vector.h
18+++ b/libutil++/growable_vector.h
19@@ -93,9 +93,9 @@ public:
20
21 /// return true if all elements have the default constructed value
22 bool zero() const {
23- return std::find_if(container.begin(), container.end(),
24- std::bind2nd(std::not_equal_to<T>(), T()))
25- == container.end();
26+ return std::find_if(begin(container), end(container),
27+ [&](auto const& elem) {return elem != T();})
28+ == end(container);
29 }
30
31 private:
32--
332.39.1
34
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb
index e6eec0ab0..335ab48bb 100644
--- a/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb
+++ b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb
@@ -31,6 +31,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
31 file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \ 31 file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \
32 file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \ 32 file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \
33 file://0001-configure-Include-unistd.h-for-getpid-API.patch \ 33 file://0001-configure-Include-unistd.h-for-getpid-API.patch \
34 file://0001-Replace-std-bind2nd-with-generic-lambda.patch \
34" 35"
35SRC_URI[sha256sum] = "7ba06f99d7c188389d20d1d5e53ee690c7733f87aa9af62bd664fa0ca235a412" 36SRC_URI[sha256sum] = "7ba06f99d7c188389d20d1d5e53ee690c7733f87aa9af62bd664fa0ca235a412"
36 37