]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add missing <algorithm> include for gcc 14 4675/head
authorPetr Vaněk <arkamar@atlas.cz>
Wed, 1 Nov 2023 10:28:53 +0000 (11:28 +0100)
committerPetr Vaněk <arkamar@atlas.cz>
Wed, 1 Nov 2023 10:56:57 +0000 (11:56 +0100)
This commit addresses a compilation issue when using GCC 14. According
to GCC 14's porting guide [1], some C++ Standard Library headers no
longer include other headers they used to use internally. Specifically,
<algorithm> must now be explicitly included.

[1] https://gcc.gnu.org/gcc-14/porting_to.html

See-also: https://bugs.gentoo.org/916438
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
src/libmime/mime_string.hxx
src/libstat/backends/http_backend.cxx

index 583a2c90372cc62f56764676b60b79dc7b1a9356..7476816c6a89043abef0831254fffac44d5d3f40 100644 (file)
@@ -17,6 +17,7 @@
 #define RSPAMD_MIME_STRING_HXX
 #pragma once
 
+#include <algorithm>
 #include <string>
 #include <string_view>
 #include <memory>
index 3b2e3efe02f0ad125cbbd9a7f61bec53f8f849c0..075e50870dfde9af73e570b87370d4394aff00ef 100644 (file)
@@ -20,6 +20,7 @@
 #include "libserver/mempool_vars_internal.h"
 #include "upstream.h"
 #include "contrib/ankerl/unordered_dense.h"
+#include <algorithm>
 #include <vector>
 
 namespace rspamd::stat::http {