Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 4d64ec843185bf6fd1b85c3a6a4c4e3c968c8ab1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 20 Jan 2019 18:56:58 -0800 |
| 4 | Subject: [PATCH] Include <array.h> for std::array |
| 5 | |
| 6 | When compiling using clang/libc++ it fails to build because this header |
| 7 | is not included, with libstdc++ this seems to be pulled in |
| 8 | automatically. |
| 9 | |
| 10 | Fixes below error |
| 11 | |
| 12 | apt-pkg/contrib/strutl.cc:949:38: error: implicit instantiation of undefined template 'std::__1::array<const char *const, 7>' |
| 13 | std::array<char const * const, 7> c_weekdays = {{ "sun", "mon", "tue", "wed", "thu", "fri", "sat" }}; |
| 14 | |
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 16 | Upstream-Status: Backport [https://github.com/Debian/apt/commit/24a59c62efafbdb8387b2d3c5616b04b9fd21306] |
| 17 | --- |
| 18 | apt-pkg/contrib/strutl.cc | 1 + |
| 19 | 1 file changed, 1 insertion(+) |
| 20 | |
| 21 | diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc |
| 22 | index 60d0ca8..c2bfcbc 100644 |
| 23 | --- a/apt-pkg/contrib/strutl.cc |
| 24 | +++ b/apt-pkg/contrib/strutl.cc |
| 25 | @@ -21,6 +21,7 @@ |
| 26 | #include <apt-pkg/fileutl.h> |
| 27 | #include <apt-pkg/error.h> |
| 28 | |
| 29 | +#include <array> |
| 30 | #include <algorithm> |
| 31 | #include <iomanip> |
| 32 | #include <locale> |
| 33 | -- |
| 34 | 2.20.1 |
| 35 | |