From f3d0373afbd219a865e83d1ebfa12a332d3e4f92 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Thu, 27 Feb 2025 14:26:38 +0000 Subject: [PATCH] Fixed Linux compile failures --- src/core/hle/service/am/am.cpp | 14 +++++++------- src/core/hle/service/fs/fs_user.cpp | 1 + src/core/hw/ecc.cpp | 3 ++- src/core/hw/rsa/rsa.cpp | 1 + src/core/hw/unique_data.cpp | 4 ++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 2e6c68799..d8356f966 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -2315,10 +2315,10 @@ void Module::Interface::GetNumImportTitleContextsImpl(IPC::RequestParser& rp, u32 count = 0; for (auto it = am->import_title_contexts.begin(); it != am->import_title_contexts.end(); it++) { - if (include_installing && + if ((include_installing && (it->second.state == ImportTitleContextState::WAITING_FOR_IMPORT || - it->second.state == ImportTitleContextState::RESUMABLE) || - include_finalizing && it->second.state == ImportTitleContextState::WAITING_FOR_COMMIT) { + it->second.state == ImportTitleContextState::RESUMABLE)) || + (include_finalizing && it->second.state == ImportTitleContextState::WAITING_FOR_COMMIT)) { count++; } } @@ -2335,11 +2335,11 @@ void Module::Interface::GetImportTitleContextListImpl(IPC::RequestParser& rp, u32 written = 0; for (auto& key_value : am->import_content_contexts) { - if (include_installing && + if ((include_installing && (key_value.second.state == ImportTitleContextState::WAITING_FOR_IMPORT || - key_value.second.state == ImportTitleContextState::RESUMABLE) || - include_finalizing && - key_value.second.state == ImportTitleContextState::WAITING_FOR_COMMIT) { + key_value.second.state == ImportTitleContextState::RESUMABLE)) || + (include_finalizing && + key_value.second.state == ImportTitleContextState::WAITING_FOR_COMMIT)) { out_buf.Write(&key_value.first, written * sizeof(u64), sizeof(u64)); written++; diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index 148411f80..76e76d720 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp @@ -1357,6 +1357,7 @@ void FS_USER::SetUnknown0x80Data(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx); u64 title_id{rp.Pop()}; + [[maybe_unused]] std::array unknown_data = rp.PopRaw>(); IPC::RequestBuilder rb{rp.MakeBuilder(1, 0)}; diff --git a/src/core/hw/ecc.cpp b/src/core/hw/ecc.cpp index 5f9cff029..b8edfd264 100644 --- a/src/core/hw/ecc.cpp +++ b/src/core/hw/ecc.cpp @@ -7,6 +7,7 @@ #include #include "common/common_paths.h" #include "common/file_util.h" +#include "common/string_util.h" #include "core/hw/aes/key.h" #include "core/hw/ecc.h" #include "cryptopp/osrng.h" @@ -209,4 +210,4 @@ const PublicKey& GetRootPublicKey() { return root_public; } -} // namespace HW::ECC \ No newline at end of file +} // namespace HW::ECC diff --git a/src/core/hw/rsa/rsa.cpp b/src/core/hw/rsa/rsa.cpp index 9104b31c6..4ec90da3f 100644 --- a/src/core/hw/rsa/rsa.cpp +++ b/src/core/hw/rsa/rsa.cpp @@ -12,6 +12,7 @@ #include #include "common/common_paths.h" #include "common/file_util.h" +#include "common/string_util.h" #include "common/logging/log.h" #include "core/hw/aes/key.h" #include "core/hw/rsa/rsa.h" diff --git a/src/core/hw/unique_data.cpp b/src/core/hw/unique_data.cpp index 8010d3c60..4ddcc4c3c 100644 --- a/src/core/hw/unique_data.cpp +++ b/src/core/hw/unique_data.cpp @@ -201,7 +201,7 @@ LocalFriendCodeSeedB& GetLocalFriendCodeSeedB() { return local_friend_code_seed_b; } -FileSys::Certificate& HW::UniqueData::GetCTCert() { +FileSys::Certificate& GetCTCert() { LoadOTP(); return ct_cert; @@ -225,4 +225,4 @@ void InvalidateSecureData() { movable.Invalidate(); } -} // namespace HW::UniqueData \ No newline at end of file +} // namespace HW::UniqueData