From bf61abd59f3ded669da2bb98fd066ea05ec17c04 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 3 Dec 2023 10:50:03 +0100 Subject: [PATCH] Also add cast for lseek in unix branch --- include/osmium/util/file.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osmium/util/file.hpp b/include/osmium/util/file.hpp index 4b1450a8..698f997e 100644 --- a/include/osmium/util/file.hpp +++ b/include/osmium/util/file.hpp @@ -228,13 +228,13 @@ namespace osmium { * @param fd Open file descriptor. * @param offset Desired absolute offset into the file */ - inline void file_seek(int fd, size_t offset) noexcept { + inline void file_seek(int fd, std::size_t offset) noexcept { #ifdef _MSC_VER osmium::detail::disable_invalid_parameter_handler diph; // https://msdn.microsoft.com/en-us/library/1yee101t.aspx _lseeki64(fd, static_cast<__int64>(offset), SEEK_SET); #else - ::lseek(fd, offset, SEEK_SET); + ::lseek(fd, static_cast(offset), SEEK_SET); #endif }