avoid setting errno when checking for tty
[musl] / src / thread / __set_thread_area.c