diff options
author | Edward Lee <e45lee@uwaterloo.ca> | 2020-10-01 09:39:54 -0400 |
---|---|---|
committer | Arun Raghavan <arun@asymptotic.io> | 2020-12-16 11:05:28 -0500 |
commit | 9c774c62950928b62cf60c697909842708393378 (patch) | |
tree | 7c1646c1148e1797ca74a8c088a5ea931c8059e7 /src | |
parent | 4552fe15b3578219d7e21cb77018a5f9425cd593 (diff) |
win32: Handle (WSA)EWOULDBLOCK as EAGAIN.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/core-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 0da5c093e..1c9746dbf 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -407,6 +407,8 @@ ssize_t pa_read(int fd, void *buf, size_t count, int *type) { if (WSAGetLastError() != WSAENOTSOCK) { errno = WSAGetLastError(); + if (errno == WSAEWOULDBLOCK) + errno = EAGAIN; return r; } @@ -448,6 +450,8 @@ ssize_t pa_write(int fd, const void *buf, size_t count, int *type) { #ifdef OS_IS_WIN32 if (WSAGetLastError() != WSAENOTSOCK) { errno = WSAGetLastError(); + if (errno == WSAEWOULDBLOCK) + errno = EAGAIN; return r; } #else |