window: add wrapper for EPOLL_CLOEXEC

Android does not have EPOLL_CLOEXEC, so add a fallback.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen
2012-05-30 15:53:43 +03:00
committed by Kristian Høgsberg
parent 200019c0c6
commit 647f2bfd2a
3 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -62,6 +62,7 @@
#include <wayland-client.h>
#include "../shared/cairo-util.h"
#include "text-cursor-position-client-protocol.h"
#include "../shared/os-compatibility.h"
#include "window.h"
@@ -3299,7 +3300,7 @@ display_create(int argc, char *argv[])
return NULL;
}
d->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
d->epoll_fd = os_epoll_create_cloexec();
d->display_fd = wl_display_get_fd(d->display, event_mask_update, d);
d->display_task.run = handle_display_data;
display_watch_fd(d, d->display_fd, EPOLLIN, &d->display_task);