From 158c90cf1196f219e6a7c9c3e23ca47129429a7b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 27 Mar 2016 14:06:51 +0200 Subject: Initial work to make MAME work on Android [Miodrag Milanovic] --- src/osd/modules/file/posixptty.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/osd/modules/file/posixptty.cpp') diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp index b84838c0578..f7842574312 100644 --- a/src/osd/modules/file/posixptty.cpp +++ b/src/osd/modules/file/posixptty.cpp @@ -22,7 +22,7 @@ #if defined(__FreeBSD__) || defined(__DragonFly__) #include #include -#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__ANDROID__) #include #include #elif defined(__linux__) || defined(EMSCRIPTEN) @@ -141,7 +141,10 @@ osd_file::error posix_open_ptty(std::uint32_t openflags, osd_file::ptr &file, st ::close(masterfd); return errno_to_file_error(err); } -#else +#elif defined(__ANDROID__) + int masterfd = -1, slavefd = -1; + char slavepath[PATH_MAX]; +#else struct termios tios; std::memset(&tios, 0, sizeof(tios)); ::cfmakeraw(&tios); -- cgit v1.2.3-70-g09d2