mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
ipc: Fix compile on musl
This commit is contained in:
parent
981f6408b8
commit
05d04b3ea0
|
@ -83,9 +83,14 @@ client_loop(volatile struct ipc_client_state *ics)
|
||||||
while (ics->server->running) {
|
while (ics->server->running) {
|
||||||
const int half_a_second_ms = 500;
|
const int half_a_second_ms = 500;
|
||||||
struct epoll_event event = XRT_STRUCT_INIT;
|
struct epoll_event event = XRT_STRUCT_INIT;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
// On temporary failures retry.
|
||||||
|
do {
|
||||||
|
// We use epoll here to be able to timeout.
|
||||||
|
ret = epoll_wait(epoll_fd, &event, 1, half_a_second_ms);
|
||||||
|
} while (ret == -1 && errno == EINTR);
|
||||||
|
|
||||||
// We use epoll here to be able to timeout.
|
|
||||||
int ret = TEMP_FAILURE_RETRY(epoll_wait(epoll_fd, &event, 1, half_a_second_ms));
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
IPC_ERROR(ics->server, "Failed epoll_wait '%i', disconnecting client.", ret);
|
IPC_ERROR(ics->server, "Failed epoll_wait '%i', disconnecting client.", ret);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue