mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-03 14:19:52 +00:00
minifi-cpp: Fix build with clang 17
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+63
@@ -0,0 +1,63 @@
|
|||||||
|
From 787d5052a6034cc722b073c652cc610ae037f933 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Levi Tamasi <ltamasi@fb.com>
|
||||||
|
Date: Fri, 22 Nov 2019 18:12:35 -0800
|
||||||
|
Subject: [PATCH 1/2] Fix the constness issues around
|
||||||
|
autovector::iterator_impl's dereference operators (#6057)
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
As described in detail in issue https://github.com/facebook/rocksdb/issues/6048, iterators' dereference operators
|
||||||
|
(`*`, `->`, and `[]`) should return `pointer`s/`reference`s (as opposed to
|
||||||
|
`const_pointer`s/`const_reference`s) even if the iterator itself is `const`
|
||||||
|
to be in sync with the standard's iterator concept.
|
||||||
|
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6057
|
||||||
|
|
||||||
|
Test Plan: make check
|
||||||
|
|
||||||
|
Differential Revision: D18623235
|
||||||
|
|
||||||
|
Pulled By: ltamasi
|
||||||
|
|
||||||
|
fbshipit-source-id: 04e82d73bc0c67fb0ded018383af8dfc332050cc
|
||||||
|
---
|
||||||
|
thirdparty/rocksdb/util/autovector.h | 15 ++++-----------
|
||||||
|
1 file changed, 4 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/thirdparty/rocksdb/util/autovector.h b/thirdparty/rocksdb/util/autovector.h
|
||||||
|
index b5c84712..6d337908 100644
|
||||||
|
--- a/thirdparty/rocksdb/util/autovector.h
|
||||||
|
+++ b/thirdparty/rocksdb/util/autovector.h
|
||||||
|
@@ -120,27 +120,20 @@ class autovector {
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Reference
|
||||||
|
- reference operator*() {
|
||||||
|
+ reference operator*() const {
|
||||||
|
assert(vect_->size() >= index_);
|
||||||
|
return (*vect_)[index_];
|
||||||
|
}
|
||||||
|
|
||||||
|
- const_reference operator*() const {
|
||||||
|
- assert(vect_->size() >= index_);
|
||||||
|
- return (*vect_)[index_];
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- pointer operator->() {
|
||||||
|
+ pointer operator->() const {
|
||||||
|
assert(vect_->size() >= index_);
|
||||||
|
return &(*vect_)[index_];
|
||||||
|
}
|
||||||
|
|
||||||
|
- const_pointer operator->() const {
|
||||||
|
- assert(vect_->size() >= index_);
|
||||||
|
- return &(*vect_)[index_];
|
||||||
|
+ reference operator[](difference_type len) const {
|
||||||
|
+ return *(*this + len);
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
// -- Logical Operators
|
||||||
|
bool operator==(const self_type& other) const {
|
||||||
|
assert(vect_ == other.vect_);
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
From a784973e500753747992a51dc0fb1caabbbb03be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 6 Jul 2023 17:52:38 -0700
|
||||||
|
Subject: [PATCH 2/2] Fix build with clang 17
|
||||||
|
|
||||||
|
Part of https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0]
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
thirdparty/cxxopts/include/cxxopts.hpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/thirdparty/cxxopts/include/cxxopts.hpp b/thirdparty/cxxopts/include/cxxopts.hpp
|
||||||
|
index e87416f1..bd2d81cf 100644
|
||||||
|
--- a/thirdparty/cxxopts/include/cxxopts.hpp
|
||||||
|
+++ b/thirdparty/cxxopts/include/cxxopts.hpp
|
||||||
|
@@ -468,14 +468,14 @@ namespace cxxopts
|
||||||
|
{
|
||||||
|
if (negative)
|
||||||
|
{
|
||||||
|
- if (u > static_cast<U>(-std::numeric_limits<T>::min()))
|
||||||
|
+ if (u > static_cast<U>((std::numeric_limits<T>::min)()))
|
||||||
|
{
|
||||||
|
throw argument_incorrect_type(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- if (u > static_cast<U>(std::numeric_limits<T>::max()))
|
||||||
|
+ if (u > static_cast<U>((std::numeric_limits<T>::max)()))
|
||||||
|
{
|
||||||
|
throw argument_incorrect_type(text);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
@@ -33,6 +33,8 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht
|
|||||||
file://0001-civetweb-Disable-lto.patch \
|
file://0001-civetweb-Disable-lto.patch \
|
||||||
file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
|
file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
|
||||||
file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
|
file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
|
||||||
|
file://0001-Fix-the-constness-issues-around-autovector-iterator_.patch \
|
||||||
|
file://0002-Fix-build-with-clang-17.patch \
|
||||||
file://minifi.service \
|
file://minifi.service \
|
||||||
file://systemd-volatile.conf \
|
file://systemd-volatile.conf \
|
||||||
file://sysvinit-volatile.conf \
|
file://sysvinit-volatile.conf \
|
||||||
|
|||||||
Reference in New Issue
Block a user