Browse Source

Patch TCSAFLUSH to be TCSANOW

android-5
Fredrik Fornwall 6 years ago
parent
commit
b5219f720c
  1. 2
      build-package.sh
  2. 11
      ndk-patches/asm-generic-termbits.h.patch

2
build-package.sh

@ -431,7 +431,7 @@ termux_step_start_build() {
TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_COMMON_CACHEDIR/${TERMUX_NDK_VERSION}-${TERMUX_ARCH}-${TERMUX_PKG_API_LEVEL}"
# Bump the below version if a change is made in toolchain setup to ensure
# that everyone gets an updated toolchain:
TERMUX_STANDALONE_TOOLCHAIN+="-v1"
TERMUX_STANDALONE_TOOLCHAIN+="-v2"
if [ -n "${TERMUX_PKG_BLACKLISTED_ARCHES:=""}" ] && [ "$TERMUX_PKG_BLACKLISTED_ARCHES" != "${TERMUX_PKG_BLACKLISTED_ARCHES/$TERMUX_ARCH/}" ]; then
echo "Skipping building $TERMUX_PKG_NAME for arch $TERMUX_ARCH"

11
ndk-patches/asm-generic-termbits.h.patch

@ -0,0 +1,11 @@
diff -u -r /home/builder/lib/android-ndk/sysroot/usr/include/asm-generic/termbits.h ./usr/include/asm-generic/termbits.h
--- /home/builder/lib/android-ndk/sysroot/usr/include/asm-generic/termbits.h 2018-09-10 17:37:50.000000000 +0000
+++ ./usr/include/asm-generic/termbits.h 2019-01-16 04:54:01.117253378 +0000
@@ -190,5 +190,6 @@
#define TCIOFLUSH 2
#define TCSANOW 0
#define TCSADRAIN 1
-#define TCSAFLUSH 2
+/* TCSAFLUSH is patched to be TCSANOW in Termux to work around Android SELinux rule */
+#define TCSAFLUSH 0
#endif
Loading…
Cancel
Save