commit aee782c: [Minor] Fix compile issues
Vsevolod Stakhov
vsevolod at rspamd.com
Tue Jun 7 21:42:03 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-06-07 22:38:44 +0100
URL: https://github.com/rspamd/rspamd/commit/aee782c192aedc7485c4b2994ff8ad59e72cce78 (HEAD -> master)
[Minor] Fix compile issues
---
src/client/rspamc.cxx | 4 ++++
src/libutil/cxx/util.hxx | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx
index 08e35013e..0c4c2663f 100644
--- a/src/client/rspamc.cxx
+++ b/src/client/rspamc.cxx
@@ -1810,7 +1810,11 @@ rspamc_process_dir(struct ev_loop *ev_base, const struct rspamc_command &cmd,
auto **ex = exclude_compiled;
auto skip = false;
while (ex != nullptr && *ex != nullptr) {
+#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 70
if (g_pattern_spec_match(*ex, fpath.size(), fpath.c_str(), nullptr)) {
+#else
+ if (g_pattern_match(*ex, fpath.size(), fpath.c_str(), nullptr)) {
+#endif
skip = true;
break;
}
diff --git a/src/libutil/cxx/util.hxx b/src/libutil/cxx/util.hxx
index 2e0308bd2..e45f16008 100644
--- a/src/libutil/cxx/util.hxx
+++ b/src/libutil/cxx/util.hxx
@@ -140,7 +140,7 @@ public:
using size_type = typename std::allocator<T>::size_type;
template<class U> struct rebind { typedef secure_mem_allocator<U> other; };
secure_mem_allocator() noexcept = default;
- secure_mem_allocator(const secure_mem_allocator &) noexcept {}
+ secure_mem_allocator(const secure_mem_allocator &_) noexcept : std::allocator<T>(_) {}
template <class U> explicit secure_mem_allocator(const secure_mem_allocator<U>&) noexcept {}
void deallocate(pointer p, size_type num) noexcept {
More information about the Commits
mailing list