]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix compile issues
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 7 Jun 2022 21:38:44 +0000 (22:38 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 7 Jun 2022 21:38:44 +0000 (22:38 +0100)
src/client/rspamc.cxx
src/libutil/cxx/util.hxx

index 08e35013eff17127ca5ef19a6d7aaa772f39b434..0c4c2663f9f1ae3229b93b20cce06368a356f6d1 100644 (file)
@@ -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;
                                }
index 2e0308bd200bb10529d9a5f218ca184b3d0769cf..e45f16008a50d15372110baf653287c025b8856c 100644 (file)
@@ -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 {