fix: duplicate template instantiation on raspberry pi armv7 (#3200)
This commit is contained in:
parent
84195254ec
commit
8806f9af68
|
@ -798,7 +798,7 @@ static void sessionSetImpl(struct init_data* const data)
|
|||
if (tr_variantDictFindStrView(settings, TR_KEY_umask, &sv))
|
||||
{
|
||||
/* Read a umask as a string representing an octal number. */
|
||||
session->umask = tr_parseNum<mode_t>(sv, 8).value_or(DefaultUmask);
|
||||
session->umask = static_cast<mode_t>(tr_parseNum<uint32_t>(sv, 8).value_or(DefaultUmask));
|
||||
umask(session->umask);
|
||||
}
|
||||
else if (tr_variantDictFindInt(settings, TR_KEY_umask, &i))
|
||||
|
|
|
@ -1416,12 +1416,12 @@ template<typename T, std::enable_if_t<std::is_integral<T>::value, bool>>
|
|||
#endif // #if defined(__GNUC__) && !__has_include(<charconv>)
|
||||
|
||||
template std::optional<int64_t> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<int> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<size_t> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<int32_t> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<int8_t> tr_parseNum(std::string_view& sv, int base);
|
||||
|
||||
#ifndef _WIN32
|
||||
template std::optional<mode_t> tr_parseNum(std::string_view& sv, int base);
|
||||
#endif
|
||||
template std::optional<uint64_t> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<uint32_t> tr_parseNum(std::string_view& sv, int base);
|
||||
template std::optional<uint8_t> tr_parseNum(std::string_view& sv, int base);
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_floating_point<T>::value, bool>>
|
||||
[[nodiscard]] std::optional<T> tr_parseNum(std::string_view& sv)
|
||||
|
|
Loading…
Reference in New Issue