Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (6 years ago)
Author:
bruno
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/libbb/getpty.c

    r2725 r3232  
    2020        grantpt(p); /* chmod+chown corresponding slave pty */
    2121        unlockpt(p); /* (what does this do?) */
    22 #if 0 /* if ptsname_r is not available... */
    23         const char *name;
    24         name = ptsname(p); /* find out the name of slave pty */
    25         if (!name) {
    26             bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)");
     22# ifndef HAVE_PTSNAME_R
     23        {
     24            const char *name;
     25            name = ptsname(p); /* find out the name of slave pty */
     26            if (!name) {
     27                bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)");
     28            }
     29            safe_strncpy(line, name, GETPTY_BUFSIZE);
    2730        }
    28         safe_strncpy(line, name, GETPTY_BUFSIZE);
    29 #else
     31# else
    3032        /* find out the name of slave pty */
    3133        if (ptsname_r(p, line, GETPTY_BUFSIZE-1) != 0) {
     
    3335        }
    3436        line[GETPTY_BUFSIZE-1] = '\0';
    35 #endif
     37# endif
    3638        return p;
    3739    }
Note: See TracChangeset for help on using the changeset viewer.