diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2018-08-12 09:45:20 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-08-12 14:31:27 +0200 |
commit | 21f0507cc193469b8ba7fccc3fc07a2bbd12784b (patch) | |
tree | b16448a6edd0559730135b32074f4beabe8a4fb0 /configs/raspberrypi2_defconfig | |
parent | 98e3c1eee505b6c92c75daa1772ba543936b099f (diff) | |
download | buildroot-21f0507cc193469b8ba7fccc3fc07a2bbd12784b.tar.gz buildroot-21f0507cc193469b8ba7fccc3fc07a2bbd12784b.zip |
ncmpc: fix build with some old toolchains
With some "old" toolchains (glibc, uclibc in version 4.9.4, 5.3, 5.4,
5.5 ...), the following error is raised by the compiler:
../src/screen.cxx:60:29: required from here
/usr/lfs/v0/rc-buildroot-test/scripts/instance-1/output/host/opt/ext-toolchain/mips-linux-gnu/include/c++/5.3.0/ext/new_allocator.h:120:4:
error: no matching function for call to 'std::pair<const screen_functions* const, std::unique_ptr<Page> >::pair(const screen_functions*, Page*)'
[...]
/usr/lfs/v0/rc-buildroot-test/scripts/instance-1/output/host/opt/ext-toolchain/mips-linux-gnu/include/c++/5.3.0/bits/stl_pair.h:112:26:
note: candidate: constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = const screen_functions* const; _T2 = std::unique_ptr<Page>]
_GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b)
^
/usr/lfs/v0/rc-buildroot-test/scripts/instance-1/output/host/opt/ext-toolchain/mips-linux-gnu/include/c++/5.3.0/bits/stl_pair.h:112:26:
note: no known conversion for argument 2 from 'Page*' to 'const std::unique_ptr<Page>&'
This is due to the fact that init function of screen_functions
structure returns Page* but PageMap wants a std::unique_ptr<Page>
To fix this, cast raw pointer into a unique_ptr with an explicit cast
Fixes:
- http://autobuild.buildroot.net/results/d8a7339d8bdd5cdc6bd1716585d4bcf15a2e8015
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'configs/raspberrypi2_defconfig')
0 files changed, 0 insertions, 0 deletions