libuv: Update from 1.20.0 to 1.20.1
[termux-packages] / packages / multitail / my_pty.c.patch
1 diff -u -r ../multitail-6.4.2/my_pty.c ./my_pty.c
2 --- ../multitail-6.4.2/my_pty.c 2014-05-01 12:54:06.000000000 +0000
3 +++ ./my_pty.c 2017-07-07 08:47:03.030247339 +0000
4 @@ -22,6 +22,7 @@
5 #include <sys/ioctl.h>
6
7 #include "mt.h"
8 +#include "utils.h" /* For myopen(). */
9
10 #ifdef __APPLE__
11 #include <util.h>
12 @@ -29,7 +30,7 @@
13 #ifdef __OpenBSD__
14 #include <util.h>
15 #endif
16 -#if defined(linux) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__)
17 +#if (defined(linux) && !defined(__ANDROID__)) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__)
18 #include <pty.h>
19 #endif
20 #if defined(__FreeBSD__) || defined(__minix)
21 @@ -78,7 +79,7 @@
22
23 int get_pty_and_fork(int *fd_master, int *fd_slave)
24 {
25 -#if defined(__FreeBSD__) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__) || defined(__minix)
26 +#if defined(__FreeBSD__) || (defined(linux) && !defined(__ANDROID__)) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__) || defined(__minix)
27
28 if (openpty(fd_master, fd_slave, NULL, NULL, NULL) == -1)
29 {
30 @@ -88,7 +89,7 @@
31
32 return fork();
33
34 -#elif defined(sun) || defined(__sun) || defined(AIX) || defined(_HPUX_SOURCE) || defined(OSF1) || defined(scoos)
35 +#elif defined(sun) || defined(__sun) || defined(AIX) || defined(_HPUX_SOURCE) || defined(OSF1) || defined(scoos) || defined(__ANDROID__)
36
37 /*
38 * This code is used e.g. on Solaris 2.x. (Note that Solaris 2.3
39 @@ -123,7 +124,7 @@
40 *fd_slave = myopen(pts, O_RDWR | O_NOCTTY);
41 if (*fd_slave < 0) error_exit(TRUE, FALSE, "Problem opening slave-side of pseudo tty (file '%s').\n", pts);
42
43 -#if !defined(AIX) && !defined(scoos)
44 +#if !defined(AIX) && !defined(scoos) && !defined(__ANDROID__)
45 /* Push the appropriate streams modules, as described in Solaris pts(7). */
46 if (ioctl(*fd_slave, I_PUSH, "ptem") < 0) error_exit(TRUE, FALSE, "ioctl I_PUSH ptem failed.\n");
47 if (ioctl(*fd_slave, I_PUSH, "ldterm") < 0) error_exit(TRUE, FALSE, "ioctl I_PUSH ldterm failed.\n");