mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
apt: Fix build with clang and libc++
Backport a fix to address random access iterator's expectation of being const-qualified inside libc++ std::__insertion_sort_unguarded implementation (From OE-Core rev: cfd74da11a5290b2e555e2f9f06779f816324ee1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From b4488583424b33f51cb031562a9e8df820ffda23 Mon Sep 17 00:00:00 2001
|
||||
From: Chongyun Lee <licy183@termux.dev>
|
||||
Date: Thu, 15 Aug 2024 21:31:24 +0800
|
||||
Subject: [PATCH] Fix compilation error with clang/libc++ 18
|
||||
|
||||
Upstream-Status: Backport [https://salsa.debian.org/apt-team/apt/-/commit/b4488583424b33f51cb031562a9e8df820ffda23]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
apt-pkg/cacheset.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
|
||||
index 5dbb9bf08..1c67a65d6 100644
|
||||
--- a/apt-pkg/cacheset.h
|
||||
+++ b/apt-pkg/cacheset.h
|
||||
@@ -218,11 +218,11 @@ public:
|
||||
operator container_iterator(void) const { return _iter; }
|
||||
inline iterator_type& operator++() { ++_iter; return static_cast<iterator_type&>(*this); }
|
||||
inline iterator_type operator++(int) { iterator_type tmp(*this); operator++(); return tmp; }
|
||||
- inline iterator_type operator+(typename container_iterator::difference_type const &n) { return iterator_type(_iter + n); }
|
||||
+ inline iterator_type operator+(typename container_iterator::difference_type const &n) const { return iterator_type(_iter + n); }
|
||||
inline iterator_type operator+=(typename container_iterator::difference_type const &n) { _iter += n; return static_cast<iterator_type&>(*this); }
|
||||
inline iterator_type& operator--() { --_iter;; return static_cast<iterator_type&>(*this); }
|
||||
inline iterator_type operator--(int) { iterator_type tmp(*this); operator--(); return tmp; }
|
||||
- inline iterator_type operator-(typename container_iterator::difference_type const &n) { return iterator_type(_iter - n); }
|
||||
+ inline iterator_type operator-(typename container_iterator::difference_type const &n) const { return iterator_type(_iter - n); }
|
||||
inline typename container_iterator::difference_type operator-(iterator_type const &b) { return (_iter - b._iter); }
|
||||
inline iterator_type operator-=(typename container_iterator::difference_type const &n) { _iter -= n; return static_cast<iterator_type&>(*this); }
|
||||
inline bool operator!=(iterator_type const &i) const { return _iter != i._iter; }
|
||||
@@ -15,6 +15,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \
|
||||
file://0001-Remove-using-std-binary_function.patch \
|
||||
file://0001-strutl-Add-missing-include-cstdint-gcc-15.patch \
|
||||
file://0001-Raise-cmake_minimum_required-to-3.13-to-avoid-warnin.patch \
|
||||
file://0001-Fix-compilation-error-with-clang-libc-18.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-native = " \
|
||||
|
||||
Reference in New Issue
Block a user