From aee782c192aedc7485c4b2994ff8ad59e72cce78 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 7 Jun 2022 22:38:44 +0100 Subject: [PATCH] [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::size_type; template struct rebind { typedef secure_mem_allocator other; }; secure_mem_allocator() noexcept = default; - secure_mem_allocator(const secure_mem_allocator &) noexcept {} + secure_mem_allocator(const secure_mem_allocator &_) noexcept : std::allocator(_) {} template explicit secure_mem_allocator(const secure_mem_allocator&) noexcept {} void deallocate(pointer p, size_type num) noexcept { -- 2.39.5