forked from enlightenment/efl
evas: fcntl use should be #ifdef protected.
This commit is contained in:
parent
c2ed021738
commit
27642f20fd
|
@ -74,7 +74,9 @@ evas_async_events_init(void)
|
||||||
_fd_read = filedes[0];
|
_fd_read = filedes[0];
|
||||||
_fd_write = filedes[1];
|
_fd_write = filedes[1];
|
||||||
|
|
||||||
|
#ifdef HAVE_EXECVP
|
||||||
fcntl(_fd_read, F_SETFL, O_NONBLOCK);
|
fcntl(_fd_read, F_SETFL, O_NONBLOCK);
|
||||||
|
#endif
|
||||||
|
|
||||||
eina_lock_new(&async_lock);
|
eina_lock_new(&async_lock);
|
||||||
eina_inarray_step_set(&async_queue, sizeof (Eina_Inarray), sizeof (Evas_Event_Async), 16);
|
eina_inarray_step_set(&async_queue, sizeof (Eina_Inarray), sizeof (Evas_Event_Async), 16);
|
||||||
|
@ -193,12 +195,16 @@ evas_async_events_process(void)
|
||||||
static void
|
static void
|
||||||
_evas_async_events_fd_blocking_set(Eina_Bool blocking)
|
_evas_async_events_fd_blocking_set(Eina_Bool blocking)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_EXECVP
|
||||||
long flags = fcntl(_fd_read, F_GETFL);
|
long flags = fcntl(_fd_read, F_GETFL);
|
||||||
|
|
||||||
if (blocking) flags &= ~O_NONBLOCK;
|
if (blocking) flags &= ~O_NONBLOCK;
|
||||||
else flags |= O_NONBLOCK;
|
else flags |= O_NONBLOCK;
|
||||||
|
|
||||||
fcntl(_fd_read, F_SETFL, flags);
|
fcntl(_fd_read, F_SETFL, flags);
|
||||||
|
#else
|
||||||
|
(void) blocking;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue