summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-31 08:21:21 +0100
committerGitHub <noreply@github.com>2021-01-31 08:21:21 +0100
commit1cc009a996a637ee15fe32e767f485858efb4ddb (patch)
treee46915fa67187e25ec93f9ba02fe0ee505b88dda
parentMerge pull request #5851 from ameerj/pop-inv-stub (diff)
parentbsd: Fix GetSockOpt stub (diff)
downloadyuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar.gz
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar.bz2
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar.lz
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar.xz
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.tar.zst
yuzu-1cc009a996a637ee15fe32e767f485858efb4ddb.zip
-rw-r--r--src/core/hle/service/sockets/bsd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 4ffb00902..9a5b32975 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -263,11 +263,15 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname);
+ std::vector<u8> optval(ctx.GetWriteBufferSize());
+
+ ctx.WriteBuffer(optval);
+
IPC::ResponseBuilder rb{ctx, 5};
rb.Push(RESULT_SUCCESS);
rb.Push<s32>(-1);
rb.PushEnum(Errno::NOTCONN);
- rb.Push<u32>(0);
+ rb.Push<u32>(static_cast<u32>(optval.size()));
}
void BSD::Listen(Kernel::HLERequestContext& ctx) {