diff --git a/tests/display-test.c b/tests/display-test.c index c2def444..1e0b389f 100644 --- a/tests/display-test.c +++ b/tests/display-test.c @@ -39,6 +39,10 @@ #include #include +#ifdef __APPLE__ +#include +#endif + #include #include @@ -1499,6 +1503,10 @@ send_overflow_client(void *data) /* Limit the send buffer size for the display socket to guarantee * that the test will cause an overflow. */ sock = wl_display_get_fd(c->wl_display); +#if __APPLE__ + /* Darwin sockets may by non-blocked after accept() */ + assert(fcntl(sock, F_SETFL, ~O_NONBLOCK) != -1); +#endif assert(setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) == 0); /* Request to break out of 'display_run' in the main process */