diff --git a/erts/emulator/nifs/common/prim_tty_nif.c b/erts/emulator/nifs/common/prim_tty_nif.c index b3a3b8b0fb27..a885026915a9 100644 --- a/erts/emulator/nifs/common/prim_tty_nif.c +++ b/erts/emulator/nifs/common/prim_tty_nif.c @@ -935,7 +935,6 @@ static ERL_NIF_TERM tty_create_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM static ERL_NIF_TERM tty_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { -#if defined(HAVE_TERMCAP) || defined(__WIN32__) ERL_NIF_TERM input; TTYResource *tty; @@ -957,6 +956,8 @@ static ERL_NIF_TERM tty_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar return atom_ok; } +#if defined(HAVE_TERMCAP) || defined(__WIN32__) + tty->tty = enif_is_identical(input, atom_raw) ? enabled : disabled; #ifndef __WIN32__