minifi-cpp: Fix build error found by clang
PATCH 1/1 minifi-cpp: Fix build error found by clang
Signed-off-by Khem Raj <[email protected]>
--- ...ession-language-Fix-build-with-clang.patch | 42 +++++++++++++++++++ .../minifi-cpp/minifi-cpp_0.7.0.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-oe/recipes-extended/minifi-cpp/files/0001-extensions-expression-language-Fix-build-with-clang.patch
meta-oe/recipes-extended/minifi-cpp/files/0001-extensions-expression-language-Fix-build-with-clang.patch new file +42 -0
@@ -0,0 +1,42 @@ +From fb6b36d8315032ca78ab6f55ef59d35131083989 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 27 May 2021 09:01:17 -0700 +Subject: [PATCH] extensions/expression-language: Fix build with clang + +Define long long version of explic Value conversion function + +Fixes + +Expression.cpp:632:10: error: ambiguous conversion for + functional-style cast from 'std::chrono::duration<long long, std::ratio<1, 1000 +>>::rep' (aka 'long long') to 'org::apache::nifi::minifi::expression::Value' + return Value(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono +::system_clock::now().time_since_epoch()).count()); + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + extensions/expression-language/common/Value.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/extensions/expression-language/common/Value.h b/extensions/expression-language/common/Value.h +index 1666637d..e7c2c7a1 100644 +--- a/extensions/expression-language/common/Value.h ++++ b/extensions/expression-language/common/Value.h +@@ -71,6 +71,12 @@ class Value { + setSignedLong(val); + } + ++ /** ++ * Construct a signed long long value ++ */ ++ explicit Value(long long val) { ++ setSignedLong(val); ++ } + /** + * Construct a long double value + */ +-- +2.31.1 +
meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +1 -0
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \ file://0003-cmake-BundledOSSPUUID.cmake-use-ossp-uuid-local-sour.patch \ file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \ file://0001-cxxopts-Add-limits-header.patch \ + file://0001-extensions-expression-language-Fix-build-with-clang.patch \ file://minifi.service \ file://systemd-volatile.conf \ file://sysvinit-volatile.conf \
Signature · 1 line
2.31.1