From c2d70dbd503a1e90f39b82fde60551f89bfff7bb Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 3 Dec 2025 19:51:35 +0100 Subject: [PATCH] fix: Build issues on clang --- lib/libimhex/source/helpers/binary_pattern.cpp | 2 ++ plugins/remote/include/content/helpers/sftp_client.hpp | 4 +--- plugins/remote/source/content/helpers/sftp_client.cpp | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libimhex/source/helpers/binary_pattern.cpp b/lib/libimhex/source/helpers/binary_pattern.cpp index 37c8aba09..80bba3619 100644 --- a/lib/libimhex/source/helpers/binary_pattern.cpp +++ b/lib/libimhex/source/helpers/binary_pattern.cpp @@ -1,5 +1,7 @@ #include +#include + namespace hex { namespace { diff --git a/plugins/remote/include/content/helpers/sftp_client.hpp b/plugins/remote/include/content/helpers/sftp_client.hpp index 3f4f6ea63..e10fb1858 100644 --- a/plugins/remote/include/content/helpers/sftp_client.hpp +++ b/plugins/remote/include/content/helpers/sftp_client.hpp @@ -148,7 +148,6 @@ namespace hex::plugin::remote { private: LIBSSH2_SFTP_HANDLE* m_handle = nullptr; bool m_atEOF = false; - SSHClient::OpenMode m_mode = SSHClient::OpenMode::Read; }; class RemoteFileSSH : public SSHClient::RemoteFile { @@ -175,8 +174,7 @@ namespace hex::plugin::remote { std::vector executeCommand(const std::string &command, std::span writeData = {}) const; private: - LIBSSH2_SESSION* m_handle = nullptr; - LIBSSH2_CHANNEL* m_channel = nullptr; + LIBSSH2_SESSION *m_handle = nullptr; bool m_atEOF = false; u64 m_seekPosition = 0x00; std::string m_readCommand, m_writeCommand, m_sizeCommand; diff --git a/plugins/remote/source/content/helpers/sftp_client.cpp b/plugins/remote/source/content/helpers/sftp_client.cpp index c9cda7ab6..668508601 100644 --- a/plugins/remote/source/content/helpers/sftp_client.cpp +++ b/plugins/remote/source/content/helpers/sftp_client.cpp @@ -4,6 +4,7 @@ #include #include +#include #if defined(OS_WINDOWS) #include @@ -247,7 +248,7 @@ namespace hex::plugin::remote { return fmt::format("{} ({})", std::string(errorString, static_cast(length)), libssh2_session_last_errno(session)); } - RemoteFileSFTP::RemoteFileSFTP(LIBSSH2_SFTP_HANDLE* handle, SSHClient::OpenMode mode) : m_handle(handle), m_mode(mode) {} + RemoteFileSFTP::RemoteFileSFTP(LIBSSH2_SFTP_HANDLE* handle, SSHClient::OpenMode mode) : RemoteFile(mode), m_handle(handle) {} RemoteFileSFTP::~RemoteFileSFTP() { if (m_handle) {