1 In Termux these are implemented in the libutil package to support android-21.
3 diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h ./usr/include/pty.h
4 --- /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h 2017-06-20 17:41:56.000000000 +0200
5 +++ ./usr/include/pty.h 2017-07-02 11:42:39.244882732 +0200
10 -#if __ANDROID_API__ >= 23
11 -int openpty(int*, int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
12 -int forkpty(int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
13 -#endif /* __ANDROID_API__ >= 23 */
14 +int openpty(int*, int*, char*, const struct termios*, const struct winsize*);
15 +int forkpty(int*, char*, const struct termios*, const struct winsize*);