1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-19 12:02:02 +00:00

bsd: Fix Poll(0) returning ETIMEDOUT instead of SUCCESS

This was an oversight of the implementation.
This commit is contained in:
Mary 2022-09-01 20:12:10 +02:00 committed by Mary-nyan
parent 131b43170e
commit 67cbdc3a6a

View file

@ -336,6 +336,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
context.Memory.Write(outputBufferPosition + (ulong)(i * Unsafe.SizeOf<PollEventData>()), events[i].Data); context.Memory.Write(outputBufferPosition + (ulong)(i * Unsafe.SizeOf<PollEventData>()), events[i].Data);
} }
// In case of non blocking call timeout should not be returned.
if (timeout == 0 && errno == LinuxError.ETIMEDOUT)
{
errno = LinuxError.SUCCESS;
}
return WriteBsdResult(context, updateCount, errno); return WriteBsdResult(context, updateCount, errno);
} }