summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
diff options
context:
space:
mode:
authorjmbills <jason.m.bills@intel.com>2021-08-03 01:45:08 +0300
committerGitHub <noreply@github.com>2021-08-03 01:45:08 +0300
commit10ad77d5bc86709d8ff7f95e7040e39f1c153903 (patch)
tree307cedb87f4c0a329740c55ac364ed489d1d8fc2 /meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
parentc6b1c6ba7a01b7987d65d61c262c44c320193108 (diff)
parent67327ddc580cb9a85219a534844832a1682780d4 (diff)
downloadopenbmc-10ad77d5bc86709d8ff7f95e7040e39f1c153903.tar.xz
Merge pull request #69 from Intel-BMC/update2021-0.631-0.63
Update
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch b/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
new file mode 100644
index 000000000..c1c118196
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
@@ -0,0 +1,36 @@
+From 72e0fe484444169007e481c9b33d8f78ebe03674 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 May 2021 15:44:10 -0700
+Subject: [PATCH] Fix build with libc++
+
+In libc++ on 32-bit platforms, int64_t is defined as alias of long long. On 64-bit platforms: long.
+
+On the other hand in definition of std::chrono::duration aliases, that you can find here long long is used
+
+Therefore create custom unit to avoid incompatibility between libstdc++
+and libc++
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ extensions/expression-language/Expression.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/extensions/expression-language/Expression.cpp b/extensions/expression-language/Expression.cpp
+index a25e1d3f..68d6320c 100644
+--- a/extensions/expression-language/Expression.cpp
++++ b/extensions/expression-language/Expression.cpp
+@@ -629,7 +629,8 @@ Value expr_toDate(const std::vector<Value> &args) {
+ #endif // EXPRESSION_LANGUAGE_USE_DATE
+
+ Value expr_now(const std::vector<Value> &args) {
+- return Value(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
++ using Milliseconds = std::chrono::duration<std::int64_t, std::chrono::milliseconds::period>;
++ return Value(std::chrono::duration_cast<Milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
+ }
+
+ Value expr_unescapeCsv(const std::vector<Value> &args) {
+--
+2.31.1
+