From c97d3cf359aa2d56d2e211a490429d02a5a1d654 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 3 Jul 2020 20:30:09 -0500 Subject: [PATCH] Fix minimum meson build. --- .builds/meson_min.yml | 2 +- src/mainclient/shell.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.builds/meson_min.yml b/.builds/meson_min.yml index e8386ca8..ab4f450f 100644 --- a/.builds/meson_min.yml +++ b/.builds/meson_min.yml @@ -17,7 +17,7 @@ tasks: meson configure -Dpeg=false meson configure -Dassembler=false meson configure -Dint_types=false - meson configure -Dtyped_arrays=false + meson configure -Dtyped_array=false meson configure -Dreduced_os=true meson configure -Dprf=false ninja # will not pass tests but should build diff --git a/src/mainclient/shell.c b/src/mainclient/shell.c index 600ac8c3..e1628eac 100644 --- a/src/mainclient/shell.c +++ b/src/mainclient/shell.c @@ -169,7 +169,9 @@ static char *sdup(const char *s) { /* Ansi terminal raw mode */ static int rawmode(void) { struct termios t; +#ifndef JANET_SINGLE_THREADED pthread_mutex_lock(&gbl_lock); +#endif if (!isatty(STDIN_FILENO)) goto fatal; if (tcgetattr(STDIN_FILENO, &gbl_termios_start) == -1) goto fatal; t = gbl_termios_start; @@ -183,7 +185,9 @@ static int rawmode(void) { return 0; fatal: errno = ENOTTY; +#ifndef JANET_SINGLE_THREADED pthread_mutex_unlock(&gbl_lock); +#endif return -1; } @@ -191,7 +195,9 @@ fatal: static void norawmode(void) { if (gbl_israwmode && tcsetattr(STDIN_FILENO, TCSAFLUSH, &gbl_termios_start) != -1) gbl_israwmode = 0; +#ifndef JANET_SINGLE_THREADED pthread_mutex_unlock(&gbl_lock); +#endif } static int curpos(void) {