diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-11 21:18:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-11 21:18:42 +0000 |
commit | e0d26115416a146503eb2ae73e2e3d9acf58622a (patch) | |
tree | fece35da47cc624d207304b3728a7c625fc6a96d /src/libutil | |
parent | 068714f9f5a96fbd94560211cec75775ee023d02 (diff) | |
download | rspamd-e0d26115416a146503eb2ae73e2e3d9acf58622a.tar.gz rspamd-e0d26115416a146503eb2ae73e2e3d9acf58622a.zip |
[Minor] Fix build on 32bit platforms
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/cxx/file_util.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/cxx/file_util.cxx b/src/libutil/cxx/file_util.cxx index e3b3a2605..4536fa97b 100644 --- a/src/libutil/cxx/file_util.cxx +++ b/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, |