replace use of ptsname_r by ptsname
Index: src/readline_curses.cc
--- src/readline_curses.cc.orig
+++ src/readline_curses.cc
@@ -843,10 +843,8 @@ readline_curses::start()
this->rc_pty[RCF_MASTER] = openpt_res.unwrap();
log_perror(grantpt(this->rc_pty[RCF_MASTER]));
log_perror(unlockpt(this->rc_pty[RCF_MASTER]));
- char slave_path_str[PATH_MAX];
- if (ptsname_r(
- this->rc_pty[RCF_MASTER], slave_path_str, sizeof(slave_path_str))
- == -1)
+ char *slave_path_str;
+ if ((slave_path_str = ptsname(this->rc_pty[RCF_MASTER])) == nullptr)
{
perror("ptsname_r");
throw error(errno);