Skip to content

Commit

Permalink
Fix MODE=tinylinux build
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Oct 13, 2023
1 parent 4bcb107 commit 0e0398c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tool/net/redbean.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions tool/net/winbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 0e0398c

Please sign in to comment.