summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/core/hle/service/sockets/sfdnsres.cpp2
-rw-r--r--src/core/hle/service/ssl/ssl_backend.h1
-rw-r--r--src/core/internal_network/network.cpp13
4 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c44febbc2..bd3808515 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -325,7 +325,7 @@ if (MINGW)
endif()
if(ENABLE_OPENSSL)
- find_package(OpenSSL 3.0.0 REQUIRED)
+ find_package(OpenSSL 1.1.1 REQUIRED)
endif()
# Please consider this as a stub
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp
index 1196fb86c..fb8798b42 100644
--- a/src/core/hle/service/sockets/sfdnsres.cpp
+++ b/src/core/hle/service/sockets/sfdnsres.cpp
@@ -96,7 +96,7 @@ static void Append(std::vector<u8>& vec, T t) {
static void AppendNulTerminated(std::vector<u8>& vec, std::string_view str) {
size_t off = vec.size();
vec.resize(off + str.size() + 1);
- std::memcpy(vec.data() + off, str.data(), str.size());
+ std::memmove(vec.data() + off, str.data(), str.size());
}
// We implement gethostbyname using the host's getaddrinfo rather than the
diff --git a/src/core/hle/service/ssl/ssl_backend.h b/src/core/hle/service/ssl/ssl_backend.h
index 624e07d41..0dd8d9118 100644
--- a/src/core/hle/service/ssl/ssl_backend.h
+++ b/src/core/hle/service/ssl/ssl_backend.h
@@ -31,6 +31,7 @@ constexpr Result ResultWouldBlock{ErrorModule::SSLSrv, 204};
class SSLConnectionBackend {
public:
+ virtual ~SSLConnectionBackend() {}
virtual void SetSocket(std::shared_ptr<Network::SocketBase> socket) = 0;
virtual Result SetHostName(const std::string& hostname) = 0;
virtual Result DoHandshake() = 0;
diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp
index 39381e06e..0164d12eb 100644
--- a/src/core/internal_network/network.cpp
+++ b/src/core/internal_network/network.cpp
@@ -97,6 +97,8 @@ bool EnableNonBlock(SOCKET fd, bool enable) {
Errno TranslateNativeError(int e) {
switch (e) {
+ case 0:
+ return Errno::SUCCESS;
case WSAEBADF:
return Errno::BADF;
case WSAEINVAL:
@@ -421,9 +423,14 @@ short TranslatePollEvents(PollEvents events) {
translate(PollEvents::WrBand, POLLWRBAND);
#ifdef _WIN32
- if (True(events & PollEvents::Pri)) {
- LOG_WARNING(Service, "Winsock doesn't support POLLPRI");
- }
+ short allowed_events = POLLRDBAND | POLLRDNORM | POLLWRNORM;
+ // Unlike poll on other OSes, WSAPoll will complain if any other flags are set on input.
+ if (result & ~allowed_events) {
+ LOG_DEBUG(Network,
+ "Removing WSAPoll input events 0x{:x} because Windows doesn't support them",
+ result & ~allowed_events);
+ }
+ result &= allowed_events;
#endif
UNIMPLEMENTED_IF_MSG((u16)events != 0, "Unhandled guest events=0x{:x}", (u16)events);