[oe-commits] [openembedded-core] 02/04: apt: Backport a patch to include std::array definition

git at git.openembedded.org git at git.openembedded.org
Mon Jan 21 12:24:45 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 50d62a99341d06b8cc0efa1da25cd271e3b6ea9b
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Jan 20 23:27:49 2019 -0800

    apt: Backport a patch to include std::array definition
    
    This partial backport helps compiling apt with clang/libc++
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/apt/apt.inc                  |  1 +
 .../apt/0001-Include-array.h-for-std-array.patch   | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index bff59e5..842c302 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -13,6 +13,7 @@ SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/${BPN}/${P
            file://disable-test.patch \
            file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
            file://0001-apt-1.2.12-Fix-musl-build.patch \
+           file://0001-Include-array.h-for-std-array.patch \
            "
 SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0"
 SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598"
diff --git a/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch
new file mode 100644
index 0000000..e4a8faa
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch
@@ -0,0 +1,35 @@
+From 4d64ec843185bf6fd1b85c3a6a4c4e3c968c8ab1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 20 Jan 2019 18:56:58 -0800
+Subject: [PATCH] Include <array.h> for std::array
+
+When compiling using clang/libc++ it fails to build because this header
+is not included, with libstdc++ this seems to be pulled in
+automatically.
+
+Fixes below error
+
+apt-pkg/contrib/strutl.cc:949:38: error: implicit instantiation of undefined template 'std::__1::array<const char *const, 7>'
+   std::array<char const * const, 7> c_weekdays = {{ "sun", "mon", "tue", "wed", "thu", "fri", "sat" }};
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Upstream-Status: Backport [https://github.com/Debian/apt/commit/24a59c62efafbdb8387b2d3c5616b04b9fd21306]
+---
+ apt-pkg/contrib/strutl.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index 60d0ca8..c2bfcbc 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -21,6 +21,7 @@
+ #include <apt-pkg/fileutl.h>
+ #include <apt-pkg/error.h>
+ 
++#include <array>
+ #include <algorithm>
+ #include <iomanip>
+ #include <locale>
+-- 
+2.20.1
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list