mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Do not fail in OSS if write() returns 0.
This commit is contained in:
parent
01569ab8ec
commit
c92f1e8281
@ -109,9 +109,9 @@ static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
return 0;
|
||||
|
||||
ssize_t ret;
|
||||
if ((ret = write(*fd, buf, size)) <= 0)
|
||||
if ((ret = write(*fd, buf, size)) < 0)
|
||||
{
|
||||
if ((fcntl(*fd, F_GETFL) & O_NONBLOCK) && errno == EAGAIN)
|
||||
if (errno == EAGAIN && (fcntl(*fd, F_GETFL) & O_NONBLOCK))
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user