From 07684b2c6561ab82558f9140b33288d90cfd0b2d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 18 Mar 2020 00:14:26 -0700 Subject: [PATCH] stratosphere: fix building with latest libnx --- libstratosphere/source/os/impl/os_inter_process_event.cpp | 2 +- libstratosphere/source/os/impl/os_waitable_holder_base.hpp | 2 +- libstratosphere/source/os/impl/os_waitable_manager_impl.cpp | 2 +- libstratosphere/source/os/impl/os_waitable_manager_impl.hpp | 2 +- libstratosphere/source/os/os_interrupt_event.cpp | 2 +- libstratosphere/source/sf/hipc/sf_hipc_api.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libstratosphere/source/os/impl/os_inter_process_event.cpp b/libstratosphere/source/os/impl/os_inter_process_event.cpp index ae3e9863..4db3e0b5 100644 --- a/libstratosphere/source/os/impl/os_inter_process_event.cpp +++ b/libstratosphere/source/os/impl/os_inter_process_event.cpp @@ -118,7 +118,7 @@ namespace ams::os::impl { while (true) { /* Continuously wait, until success. */ - R_TRY_CATCH(svcWaitSynchronizationSingle(handle, U64_MAX)) { + R_TRY_CATCH(svcWaitSynchronizationSingle(handle, std::numeric_limits::max())) { R_CATCH(svc::ResultCancelled) { continue; } } R_END_TRY_CATCH_WITH_ABORT_UNLESS; diff --git a/libstratosphere/source/os/impl/os_waitable_holder_base.hpp b/libstratosphere/source/os/impl/os_waitable_holder_base.hpp index 441ac04b..d64fc1b1 100644 --- a/libstratosphere/source/os/impl/os_waitable_holder_base.hpp +++ b/libstratosphere/source/os/impl/os_waitable_holder_base.hpp @@ -38,7 +38,7 @@ namespace ams::os::impl { virtual Handle GetHandle() const = 0; /* Gets the amount of time remaining until this wakes up. */ virtual u64 GetWakeupTime() const { - return U64_MAX; + return std::numeric_limits::max(); } /* Interface with manager. */ diff --git a/libstratosphere/source/os/impl/os_waitable_manager_impl.cpp b/libstratosphere/source/os/impl/os_waitable_manager_impl.cpp index 2f66b7c0..73691df5 100644 --- a/libstratosphere/source/os/impl/os_waitable_manager_impl.cpp +++ b/libstratosphere/source/os/impl/os_waitable_manager_impl.cpp @@ -51,7 +51,7 @@ namespace ams::os::impl{ WaitableHolderBase *objects[MaximumHandleCount]; const size_t count = this->BuildHandleArray(object_handles, objects); - const u64 end_time = infinite ? U64_MAX : armTicksToNs(armGetSystemTick()); + const u64 end_time = infinite ? std::numeric_limits::max() : armTicksToNs(armGetSystemTick()); while (true) { this->current_time = armTicksToNs(armGetSystemTick()); diff --git a/libstratosphere/source/os/impl/os_waitable_manager_impl.hpp b/libstratosphere/source/os/impl/os_waitable_manager_impl.hpp index be2fc702..0c068dd4 100644 --- a/libstratosphere/source/os/impl/os_waitable_manager_impl.hpp +++ b/libstratosphere/source/os/impl/os_waitable_manager_impl.hpp @@ -44,7 +44,7 @@ namespace ams::os::impl { public: /* Wait. */ WaitableHolderBase *WaitAny() { - return this->WaitAnyImpl(true, U64_MAX); + return this->WaitAnyImpl(true, std::numeric_limits::max()); } WaitableHolderBase *TryWaitAny() { diff --git a/libstratosphere/source/os/os_interrupt_event.cpp b/libstratosphere/source/os/os_interrupt_event.cpp index e700107c..87e4f77f 100644 --- a/libstratosphere/source/os/os_interrupt_event.cpp +++ b/libstratosphere/source/os/os_interrupt_event.cpp @@ -49,7 +49,7 @@ namespace ams::os { while (true) { /* Continuously wait, until success. */ - R_TRY_CATCH(svcWaitSynchronizationSingle(this->handle.Get(), U64_MAX)) { + R_TRY_CATCH(svcWaitSynchronizationSingle(this->handle.Get(), std::numeric_limits::max())) { R_CATCH(svc::ResultCancelled) { continue; } } R_END_TRY_CATCH_WITH_ABORT_UNLESS; diff --git a/libstratosphere/source/sf/hipc/sf_hipc_api.cpp b/libstratosphere/source/sf/hipc/sf_hipc_api.cpp index 4b109f96..3f6658a6 100644 --- a/libstratosphere/source/sf/hipc/sf_hipc_api.cpp +++ b/libstratosphere/source/sf/hipc/sf_hipc_api.cpp @@ -23,9 +23,9 @@ namespace ams::sf::hipc { s32 unused_index; if (message_buf == armGetTls()) { /* Consider: AMS_ABORT_UNLESS(message_buf_size == TlsMessageBufferSize); */ - return svcReplyAndReceive(&unused_index, &session_handle, 1, INVALID_HANDLE, U64_MAX); + return svcReplyAndReceive(&unused_index, &session_handle, 1, INVALID_HANDLE, std::numeric_limits::max()); } else { - return svcReplyAndReceiveWithUserBuffer(&unused_index, message_buf, message_buf_size, &session_handle, 1, INVALID_HANDLE, U64_MAX); + return svcReplyAndReceiveWithUserBuffer(&unused_index, message_buf, message_buf_size, &session_handle, 1, INVALID_HANDLE, std::numeric_limits::max()); } }