Fix ptsname(3) and ttyname(3) to use TLS.

Be safe by default.

Change-Id: I6c4a3f1fd4eee3a651b3162ce95b7e873de57521
This commit is contained in:
Elliott Hughes
2014-12-09 20:30:23 -08:00
parent 3592743f71
commit a381fe8ebc
4 changed files with 14 additions and 7 deletions

View File

@@ -195,7 +195,7 @@ extern char *optarg;
extern int optind, opterr, optopt;
extern int isatty(int);
extern char* ttyname(int) __warnattr("ttyname is not thread-safe; use ttyname_r instead");
extern char* ttyname(int);
extern int ttyname_r(int, char*, size_t);
extern int acct(const char* filepath);