diff options
Diffstat (limited to 'mail/rspamd/files')
| -rw-r--r-- | mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx | 21 | ||||
| -rw-r--r-- | mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx | 22 |
2 files changed, 0 insertions, 43 deletions
diff --git a/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx b/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx deleted file mode 100644 index 72eb1173ae88..000000000000 --- a/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx -index 6187208a9..96366067d 100644 ---- src/libserver/hyperscan_tools.cxx -+++ src/libserver/hyperscan_tools.cxx -@@ -306,7 +306,15 @@ auto load_cached_hs_file(const char *fname, std::int64_t offset = 0) -> tl::expe - msg_debug_hyperscan_lambda("multipattern: create new database in %s; %Hz size", - tmpfile_pattern.data(), unserialized_size); - void *buf; -- posix_memalign(&buf, 16, unserialized_size); -+#ifdef HAVE_GETPAGESIZE -+ auto page_size = getpagesize(); -+#else -+ auto page_size = sysconf(_SC_PAGESIZE); -+#endif -+ if (page_size == -1) { -+ page_size = 4096; -+ } -+ posix_memalign(&buf, page_size, unserialized_size); - if (buf == nullptr) { - return tl::make_unexpected(error {"Cannot allocate memory", errno, error_category::CRITICAL }); - } diff --git a/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx b/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx deleted file mode 100644 index f7461da0c82b..000000000000 --- a/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/libutil/cxx/file_util.cxx b/src/libutil/cxx/file_util.cxx -index e3b3a2605..4536fa97b 100644 ---- src/libutil/cxx/file_util.cxx -+++ src/libutil/cxx/file_util.cxx -@@ -198,7 +198,7 @@ auto raii_mmaped_file::mmap_shared(raii_file &&file, - } - /* Update stat on file to ensure it is up-to-date */ - file.update_stat(); -- map = mmap(nullptr, file.get_size() - offset, flags, MAP_SHARED, file.get_fd(), offset); -+ map = mmap(nullptr, (std::size_t)(file.get_size() - offset), flags, MAP_SHARED, file.get_fd(), offset); - - if (map == MAP_FAILED) { - return tl::make_unexpected(error { fmt::format("cannot mmap file {}: {}", -@@ -206,7 +206,7 @@ auto raii_mmaped_file::mmap_shared(raii_file &&file, - - } - -- return raii_mmaped_file{std::move(file), map, file.get_size() - offset}; -+ return raii_mmaped_file{std::move(file), map, (std::size_t)(file.get_size() - offset)}; - } - - auto raii_mmaped_file::mmap_shared(const char *fname, int open_flags, |
