| Index: services/native_support/make_pty_pair.cc
|
| diff --git a/services/native_support/make_pty_pair.cc b/services/native_support/make_pty_pair.cc
|
| index 2af21f5216e7f79526a47e2f2b5d61fca1a5e36b..0a4450f33ab4a008dd95dc8fcc7b8e70c7cc3fc0 100644
|
| --- a/services/native_support/make_pty_pair.cc
|
| +++ b/services/native_support/make_pty_pair.cc
|
| @@ -23,11 +23,15 @@ bool MakePtyPair(base::ScopedFD* master_fd,
|
| DCHECK(!slave_fd->is_valid()); // Not very wrong, but unlikely.
|
| DCHECK(errno_value);
|
|
|
| - // TODO(vtl): |getpt()| is a glibc extension.
|
| +#if defined(FNL_MUSL)
|
| + base::ScopedFD master(posix_openpt(O_RDWR | O_NOCTTY));
|
| +#else
|
| + // Android doesn't yet have posix_openpt
|
| base::ScopedFD master(getpt());
|
| +#endif
|
| if (!master.is_valid()) {
|
| *errno_value = errno;
|
| - PLOG(ERROR) << "getpt()";
|
| + PLOG(ERROR) << "posix_openpt/getpt";
|
| return false;
|
| }
|
|
|
|
|