am 3617bdf3: am f6304733: Merge "Fix "ptsname is not thread-safe; use ptsname_r instead" build break."
* commit '3617bdf3ef2084c2df19d1fa4ae802b832c79c2a':
Fix "ptsname is not thread-safe; use ptsname_r instead" build break.
diff --git a/logwrapper/logwrap.c b/logwrapper/logwrap.c
index d47c9b5..3a6276e 100644
--- a/logwrapper/logwrap.c
+++ b/logwrapper/logwrap.c
@@ -477,7 +477,6 @@
pid_t pid;
int parent_ptty;
int child_ptty;
- char *child_devname = NULL;
struct sigaction intact;
struct sigaction quitact;
sigset_t blockset;
@@ -498,8 +497,9 @@
goto err_open;
}
+ char child_devname[64];
if (grantpt(parent_ptty) || unlockpt(parent_ptty) ||
- ((child_devname = (char*)ptsname(parent_ptty)) == 0)) {
+ ptsname_r(parent_ptty, child_devname, sizeof(child_devname)) != 0) {
ERROR("Problem with /dev/ptmx\n");
rc = -1;
goto err_ptty;