mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +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;
|
return 0;
|
||||||
|
|
||||||
ssize_t ret;
|
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 0;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user