Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: services/native_support/make_pty_pair.cc

Issue 1422623002: Build fixes for fnl/musl (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix android build Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « services/BUILD.gn ('k') | shell/BUILD.gn » ('j') | third_party/libevent/linux/sys/queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698