mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-18 05:34:45 -04:00
build: fix build on darwin
Signed-off-by: Weijia Wang <contact@weijia.wang>
This commit is contained in:
parent
dc2be77f63
commit
f9aa9b4a07
7 changed files with 49 additions and 9 deletions
|
|
@ -39,6 +39,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
#include <poll.h>
|
||||
|
||||
|
|
@ -1495,6 +1499,9 @@ 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);
|
||||
#ifdef __APPLE__
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue