libstdc++ in GCC 14 has dropped several nested includes. Include the
<algorithms> header to fix build error:
system/core/fs_mgr/liblp/utility.cpp: In function 'bool
android::fs_mgr::UpdateMetadataForInPlaceSnapshot(LpMetadata*, uint32_t,
uint32_t)':
system/core/fs_mgr/liblp/utility.cpp:264:28: error: no matching function for
call to 'find(std::vector<LpMetadataPartitionGroup*>::iterator,
std::vector<LpMetadataPartitionGroup*>::iterator,
__gnu_cxx::__alloc_traits<std::allocator<LpMetadataPartitionGroup>,
LpMetadataPartitionGroup>::value_type*)'
264 | auto it = std::find(new_group_ptrs.begin(),
new_group_ptrs.end(),
|
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265 | &metadata->groups[partition.group_index]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
.../0001-liblp-fix-building-with-GCC-14.patch | 26 +++++++++++++++++++
.../android-tools/android-tools_29.0.6.r14.bb | 1 +
2 files changed, 27 insertions(+)
create mode 100644
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch
diff --git
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch
new file mode 100644
index 000000000000..ccd289c81ba9
--- /dev/null
+++
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch
@@ -0,0 +1,26 @@
+From 9f4d839847666019cadf57aa34fd366801c11a44 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <[email protected]>
+Date: Fri, 24 May 2024 14:13:35 +0300
+Subject: [PATCH] liblp: fix building with GCC 14
+
+Upstream-Status: Pending
+Signed-off-by: Dmitry Baryshkov <[email protected]>
+---
+ system/core/fs_mgr/liblp/utility.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/system/core/fs_mgr/liblp/utility.cpp
b/system/core/fs_mgr/liblp/utility.cpp
+index 48c5c8318d99..0aa8023aa87d 100644
+--- a/system/core/fs_mgr/liblp/utility.cpp
++++ b/system/core/fs_mgr/liblp/utility.cpp
+@@ -24,6 +24,7 @@
+ #include <sys/ioctl.h>
+ #endif
+
++#include <algorithm>
+ #include <map>
+ #include <string>
+ #include <vector>
+--
+2.39.2
+
diff --git
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb
index f63b5c04b364..176107f2a7e2 100644
---
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb
+++
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb
@@ -52,6 +52,7 @@ SRC_URI += " \
file://0003-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch \
file://0004-adb-Fix-build-on-big-endian-systems.patch \
file://0005-adb-Allow-adbd-to-be-run-as-root.patch \
+ file://0001-liblp-fix-building-with-GCC-14.patch \
"
S = "${WORKDIR}/git"
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110510):
https://lists.openembedded.org/g/openembedded-devel/message/110510
Mute This Topic: https://lists.openembedded.org/mt/106279982/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-