Fix compiling bundled olm

This commit is contained in:
Nicolas Werner 2025-06-15 19:08:47 +02:00
parent d7fa10522b
commit a4fe9d65a7
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 16 additions and 1 deletions

View file

@ -538,7 +538,9 @@ if(USE_BUNDLED_OLM)
FetchContent_Declare(
Olm
GIT_REPOSITORY https://gitlab.matrix.org/matrix-org/olm.git
GIT_TAG 3.2.12
GIT_TAG 3.2.16
PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/third_party/olm-patches/0001-fix-list-const-ptr.patch
UPDATE_DISCONNECTED 1
)
set(OLM_TESTS OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(Olm)

View file

@ -0,0 +1,13 @@
diff --git a/include/olm/list.hh b/include/olm/list.hh
index 6906c87..e8f3b7c 100644
--- a/include/olm/list.hh
+++ b/include/olm/list.hh
@@ -99,7 +99,7 @@ public:
return *this;
}
T * this_pos = _data;
- T * const other_pos = other._data;
+ T const * other_pos = other._data;
while (other_pos != other._end) {
*this_pos = *other;
++this_pos;