mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
LibCore: Allow LibCore to be compiled on macOS host
Compiling LibCore on macOS is needed if one wants to compile host tools (like IPCCompiler) on a non Linux host. These changes could be possibly reverted once "event loop" functionality and "base library" (Vector, String etc.) will be split in two separate libraries, updating all relevant projects.
This commit is contained in:
committed by
Andreas Kling
parent
aab412bd85
commit
1222b94ab8
@@ -136,7 +136,14 @@ CEventLoop::CEventLoop()
|
||||
|
||||
if (!s_main_event_loop) {
|
||||
s_main_event_loop = this;
|
||||
#if defined(SOCK_NONBLOCK)
|
||||
int rc = pipe2(s_wake_pipe_fds, O_CLOEXEC);
|
||||
#else
|
||||
int rc = pipe(s_wake_pipe_fds);
|
||||
fcntl(s_wake_pipe_fds[0], F_SETFD, FD_CLOEXEC);
|
||||
fcntl(s_wake_pipe_fds[1], F_SETFD, FD_CLOEXEC);
|
||||
|
||||
#endif
|
||||
ASSERT(rc == 0);
|
||||
s_event_loop_stack->append(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user