mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Fix MODE=tinylinux build
This commit is contained in:
parent
4bcb107cb0
commit
0e0398cd5d
2 changed files with 10 additions and 3 deletions
|
@ -4823,6 +4823,7 @@ static int LuaBlackhole(lua_State *L) {
|
|||
wontreturn static void Replenisher(void) {
|
||||
struct timespec ts;
|
||||
VERBOSEF("(token) replenish worker started");
|
||||
strace_enabled(-1);
|
||||
signal(SIGINT, OnTerm);
|
||||
signal(SIGHUP, OnTerm);
|
||||
signal(SIGTERM, OnTerm);
|
||||
|
@ -7149,7 +7150,7 @@ static void ReplEventLoop(void) {
|
|||
lua_repl_completions_callback = HandleCompletions;
|
||||
lua_initrepl(L);
|
||||
EnableRawMode();
|
||||
EventLoop(100);
|
||||
EventLoop(-1);
|
||||
DisableRawMode();
|
||||
lua_freerepl();
|
||||
lua_settop(L, 0); // clear stack
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/timespec.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/dns/dns.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
|
@ -122,7 +123,7 @@ static void NewClient(struct Client *client, const struct sockaddr_in *addr) {
|
|||
}
|
||||
}
|
||||
|
||||
void *Worker(void *arg) {
|
||||
static void *Worker(void *arg) {
|
||||
while (!a_finished) {
|
||||
bool32 ok;
|
||||
uint32_t dwFlags;
|
||||
|
@ -195,12 +196,17 @@ void *Worker(void *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void OnTerm(int sig) {
|
||||
static void OnTerm(int sig) {
|
||||
a_termsig = sig;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
if (!IsWindows()) {
|
||||
tinyprint(2, "error: this program is intended for windows\n", NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
prog = argv[0];
|
||||
if (!prog) {
|
||||
prog = "ab";
|
||||
|
|
Loading…
Reference in a new issue