mirror of
https://github.com/janet-lang/janet
synced 2025-06-22 16:34:11 +00:00
Attempt 2 to fix bsd compilation errors.
This commit is contained in:
parent
8f516a1e28
commit
b6e3020d4c
@ -1748,7 +1748,7 @@ JanetListenerState *janet_listen(JanetStream *stream, JanetListener behavior, in
|
|||||||
int status;
|
int status;
|
||||||
do {
|
do {
|
||||||
status = kevent(janet_vm.kq, &kev, 1, NULL, 0, NULL);
|
status = kevent(janet_vm.kq, &kev, 1, NULL, 0, NULL);
|
||||||
} while (status == -1 errno != EINTR);
|
} while (status == -1 && errno != EINTR);
|
||||||
if (status == -1) {
|
if (status == -1) {
|
||||||
janet_panicv(janet_ev_lasterr());
|
janet_panicv(janet_ev_lasterr());
|
||||||
}
|
}
|
||||||
@ -1836,7 +1836,7 @@ void janet_ev_init(void) {
|
|||||||
if (janet_vm.kq == -1) goto error;
|
if (janet_vm.kq == -1) goto error;
|
||||||
struct kevent event;
|
struct kevent event;
|
||||||
EV_SETx(&event, janet_vm.selfpipe[0], EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, janet_vm.selfpipe);
|
EV_SETx(&event, janet_vm.selfpipe[0], EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, janet_vm.selfpipe);
|
||||||
add_kqueue_events(&event, 1);
|
int status;
|
||||||
do {
|
do {
|
||||||
status = kevent(janet_vm.kq, &event, 1, NULL, 0, NULL);
|
status = kevent(janet_vm.kq, &event, 1, NULL, 0, NULL);
|
||||||
} while (status == -1 errno != EINTR);
|
} while (status == -1 errno != EINTR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user