Fredrik Fornwall
8 years ago
7 changed files with 46 additions and 24 deletions
@ -0,0 +1,18 @@ |
|||
In Termux these are implemented in the libutil package to support android-21. |
|||
|
|||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h ./usr/include/pty.h
|
|||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h 2017-06-20 17:41:56.000000000 +0200
|
|||
+++ ./usr/include/pty.h 2017-07-02 11:42:39.244882732 +0200
|
|||
@@ -37,10 +37,8 @@
|
|||
__BEGIN_DECLS |
|||
|
|||
|
|||
-#if __ANDROID_API__ >= 23
|
|||
-int openpty(int*, int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
|
|||
-int forkpty(int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
|
|||
-#endif /* __ANDROID_API__ >= 23 */
|
|||
+int openpty(int*, int*, char*, const struct termios*, const struct winsize*);
|
|||
+int forkpty(int*, char*, const struct termios*, const struct winsize*);
|
|||
|
|||
|
|||
__END_DECLS |
@ -0,0 +1,18 @@ |
|||
In Termux login_tty() is implemented in the libutil package to support android-21. |
|||
|
|||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/utmp.h ./usr/include/utmp.h
|
|||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/utmp.h 2017-06-20 17:41:56.000000000 +0200
|
|||
+++ ./usr/include/utmp.h 2017-07-02 11:42:29.724986159 +0200
|
|||
@@ -102,11 +102,6 @@
|
|||
void endutent(void); |
|||
|
|||
|
|||
-#if __ANDROID_API__ >= 23
|
|||
-int login_tty(int) __INTRODUCED_IN(23);
|
|||
-#endif /* __ANDROID_API__ >= 23 */
|
|||
-
|
|||
-
|
|||
-__END_DECLS
|
|||
+int login_tty(int);
|
|||
|
|||
#endif /* _UTMP_H_ */ |
@ -1,11 +1,10 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://refspecs.linuxbase.org/LSB_2.1.0/LSB-generic/LSB-generic/libutil.html |
|||
TERMUX_PKG_DESCRIPTION="Library with terminal functions" |
|||
TERMUX_PKG_VERSION=0.2 |
|||
TERMUX_PKG_VERSION=0.3 |
|||
TERMUX_PKG_BUILD_IN_SRC=yes |
|||
|
|||
termux_step_make_install () { |
|||
CFLAGS+=" -std=c11" |
|||
$CC $CFLAGS -c -fPIC $TERMUX_PKG_BUILDER_DIR/pty.c -o pty.o |
|||
CPPFLAGS+=" -std=c11 -Wall -Werror" |
|||
$CC $CPPFLAGS $CFLAGS -c -fPIC $TERMUX_PKG_BUILDER_DIR/pty.c -o pty.o |
|||
$CC -shared -fPIC $LDFLAGS -o $TERMUX_PREFIX/lib/libutil.so pty.o |
|||
cp $TERMUX_PKG_BUILDER_DIR/pty.h $TERMUX_PREFIX/include/ |
|||
} |
|||
|
@ -1,17 +0,0 @@ |
|||
#ifndef _PTY_H |
|||
#define _PTY_H |
|||
|
|||
#include <sys/cdefs.h> |
|||
#include <termios.h> |
|||
|
|||
__BEGIN_DECLS |
|||
|
|||
int openpty(int* amaster, int* aslave, char* name, struct termios* termp, struct winsize* winp); |
|||
|
|||
int login_tty(int fd); |
|||
|
|||
int forkpty(int* amaster, char* name, struct termios* termp, struct winsize* winp); |
|||
|
|||
__END_DECLS |
|||
|
|||
#endif |
Loading…
Reference in new issue