[Bug 213941] LSB: ttyname_r() returns an incorrect error value on a bad filedescriptor