mirror of
https://github.com/janet-lang/janet
synced 2025-10-30 15:13:03 +00:00
Windows quirk fix
This commit is contained in:
@@ -620,6 +620,7 @@ static void janet_timeout_stop(int sig_num) {
|
|||||||
static void handle_timeout_worker(JanetTimeout to, int cancel) {
|
static void handle_timeout_worker(JanetTimeout to, int cancel) {
|
||||||
if (!to.has_worker) return;
|
if (!to.has_worker) return;
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
|
(void) cancel;
|
||||||
QueueUserAPC(janet_timeout_stop, to.worker, 0);
|
QueueUserAPC(janet_timeout_stop, to.worker, 0);
|
||||||
WaitForSingleObject(to.worker, INFINITE);
|
WaitForSingleObject(to.worker, INFINITE);
|
||||||
CloseHandle(to.worker);
|
CloseHandle(to.worker);
|
||||||
|
|||||||
@@ -384,7 +384,11 @@ static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int sock
|
|||||||
janet_panicf("could not get address info: %s", gai_strerror(status));
|
janet_panicf("could not get address info: %s", gai_strerror(status));
|
||||||
}
|
}
|
||||||
*is_unix = 0;
|
*is_unix = 0;
|
||||||
|
#ifdef JANET_WINDOWS
|
||||||
|
*sizeout = 0;
|
||||||
|
#else
|
||||||
*sizeout = sizeof(struct sockaddr_un);
|
*sizeout = sizeof(struct sockaddr_un);
|
||||||
|
#endif
|
||||||
return ai;
|
return ai;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user