man ttyname_r () - See ttyname.3posix

REFERENCE

See ttyname.3posix