diff options
3 files changed, 102 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-the-constness-issues-around-autovector-iterator_.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-the-constness-issues-around-autovector-iterator_.patch new file mode 100644 index 0000000000..acb96f40d5 --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-the-constness-issues-around-autovector-iterator_.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From 787d5052a6034cc722b073c652cc610ae037f933 Mon Sep 17 00:00:00 2001 | ||
2 | From: Levi Tamasi <ltamasi@fb.com> | ||
3 | Date: Fri, 22 Nov 2019 18:12:35 -0800 | ||
4 | Subject: [PATCH 1/2] Fix the constness issues around | ||
5 | autovector::iterator_impl's dereference operators (#6057) | ||
6 | |||
7 | Summary: | ||
8 | As described in detail in issue https://github.com/facebook/rocksdb/issues/6048, iterators' dereference operators | ||
9 | (`*`, `->`, and `[]`) should return `pointer`s/`reference`s (as opposed to | ||
10 | `const_pointer`s/`const_reference`s) even if the iterator itself is `const` | ||
11 | to be in sync with the standard's iterator concept. | ||
12 | Pull Request resolved: https://github.com/facebook/rocksdb/pull/6057 | ||
13 | |||
14 | Test Plan: make check | ||
15 | |||
16 | Differential Revision: D18623235 | ||
17 | |||
18 | Pulled By: ltamasi | ||
19 | |||
20 | fbshipit-source-id: 04e82d73bc0c67fb0ded018383af8dfc332050cc | ||
21 | --- | ||
22 | thirdparty/rocksdb/util/autovector.h | 15 ++++----------- | ||
23 | 1 file changed, 4 insertions(+), 11 deletions(-) | ||
24 | |||
25 | diff --git a/thirdparty/rocksdb/util/autovector.h b/thirdparty/rocksdb/util/autovector.h | ||
26 | index b5c84712..6d337908 100644 | ||
27 | --- a/thirdparty/rocksdb/util/autovector.h | ||
28 | +++ b/thirdparty/rocksdb/util/autovector.h | ||
29 | @@ -120,27 +120,20 @@ class autovector { | ||
30 | } | ||
31 | |||
32 | // -- Reference | ||
33 | - reference operator*() { | ||
34 | + reference operator*() const { | ||
35 | assert(vect_->size() >= index_); | ||
36 | return (*vect_)[index_]; | ||
37 | } | ||
38 | |||
39 | - const_reference operator*() const { | ||
40 | - assert(vect_->size() >= index_); | ||
41 | - return (*vect_)[index_]; | ||
42 | - } | ||
43 | - | ||
44 | - pointer operator->() { | ||
45 | + pointer operator->() const { | ||
46 | assert(vect_->size() >= index_); | ||
47 | return &(*vect_)[index_]; | ||
48 | } | ||
49 | |||
50 | - const_pointer operator->() const { | ||
51 | - assert(vect_->size() >= index_); | ||
52 | - return &(*vect_)[index_]; | ||
53 | + reference operator[](difference_type len) const { | ||
54 | + return *(*this + len); | ||
55 | } | ||
56 | |||
57 | - | ||
58 | // -- Logical Operators | ||
59 | bool operator==(const self_type& other) const { | ||
60 | assert(vect_ == other.vect_); | ||
61 | -- | ||
62 | 2.41.0 | ||
63 | |||
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0002-Fix-build-with-clang-17.patch b/meta-oe/recipes-extended/minifi-cpp/files/0002-Fix-build-with-clang-17.patch new file mode 100644 index 0000000000..7581efc763 --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0002-Fix-build-with-clang-17.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From a784973e500753747992a51dc0fb1caabbbb03be Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 6 Jul 2023 17:52:38 -0700 | ||
4 | Subject: [PATCH 2/2] Fix build with clang 17 | ||
5 | |||
6 | Part of https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0 | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | thirdparty/cxxopts/include/cxxopts.hpp | 4 ++-- | ||
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/thirdparty/cxxopts/include/cxxopts.hpp b/thirdparty/cxxopts/include/cxxopts.hpp | ||
15 | index e87416f1..bd2d81cf 100644 | ||
16 | --- a/thirdparty/cxxopts/include/cxxopts.hpp | ||
17 | +++ b/thirdparty/cxxopts/include/cxxopts.hpp | ||
18 | @@ -468,14 +468,14 @@ namespace cxxopts | ||
19 | { | ||
20 | if (negative) | ||
21 | { | ||
22 | - if (u > static_cast<U>(-std::numeric_limits<T>::min())) | ||
23 | + if (u > static_cast<U>((std::numeric_limits<T>::min)())) | ||
24 | { | ||
25 | throw argument_incorrect_type(text); | ||
26 | } | ||
27 | } | ||
28 | else | ||
29 | { | ||
30 | - if (u > static_cast<U>(std::numeric_limits<T>::max())) | ||
31 | + if (u > static_cast<U>((std::numeric_limits<T>::max)())) | ||
32 | { | ||
33 | throw argument_incorrect_type(text); | ||
34 | } | ||
35 | -- | ||
36 | 2.41.0 | ||
37 | |||
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb index 9ae72d2e99..0986fdec07 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | |||
@@ -33,6 +33,8 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht | |||
33 | file://0001-civetweb-Disable-lto.patch \ | 33 | file://0001-civetweb-Disable-lto.patch \ |
34 | file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ | 34 | file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ |
35 | file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ | 35 | file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ |
36 | file://0001-Fix-the-constness-issues-around-autovector-iterator_.patch \ | ||
37 | file://0002-Fix-build-with-clang-17.patch \ | ||
36 | file://minifi.service \ | 38 | file://minifi.service \ |
37 | file://systemd-volatile.conf \ | 39 | file://systemd-volatile.conf \ |
38 | file://sysvinit-volatile.conf \ | 40 | file://sysvinit-volatile.conf \ |