diff --git a/src/nmstermio.c b/src/nmstermio.c index f4f082c..2aa8ca2 100644 --- a/src/nmstermio.c +++ b/src/nmstermio.c @@ -296,7 +296,7 @@ static void nmstermio_set_terminal(int s) { static int state = 1; if (!isatty(STDIN_FILENO)) { - stdin = freopen("/dev/tty", "r", stdin); + freopen("/dev/tty", "r", stdin); } if (s == 0) { diff --git a/src/nmstermio_ncurses.c b/src/nmstermio_ncurses.c index 928ede7..7836087 100644 --- a/src/nmstermio_ncurses.c +++ b/src/nmstermio_ncurses.c @@ -28,7 +28,7 @@ static int foregroundColor = COLOR_BLUE; // Foreground color settin */ void nmstermio_init_terminal(void) { if (!isatty(STDIN_FILENO)) { - stdin = freopen("/dev/tty", "r", stdin); + freopen("/dev/tty", "r", stdin); } initscr(); cbreak();