From 7c228b846ecea69e6d1a1905e25ac4175112affd Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:12:17 +0900 Subject: [PATCH] ndk-patches: Add IFTODT and DTTOIF to dirent.h (#8041) ndk-patches: Add IFTODT and DTTOIF to dirent.h --- ndk-patches/dirent.h.patch | 12 ++++++++++++ scripts/build/termux_step_start_build.sh | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 ndk-patches/dirent.h.patch diff --git a/ndk-patches/dirent.h.patch b/ndk-patches/dirent.h.patch new file mode 100644 index 000000000..5865a9487 --- /dev/null +++ b/ndk-patches/dirent.h.patch @@ -0,0 +1,12 @@ +--- ./usr/include/dirent.h.orig ++++ ./usr/include/dirent.h +@@ -57,6 +57,9 @@ + #define DT_SOCK 12 + #define DT_WHT 14 + ++#define IFTODT(x) ((x)>>12 & 0xF) ++#define DTTOIF(x) ((x)<<12) ++ + #if defined(__LP64__) + #define __DIRENT64_INO_T ino_t + #else diff --git a/scripts/build/termux_step_start_build.sh b/scripts/build/termux_step_start_build.sh index 5f836ff27..fa537c6f1 100644 --- a/scripts/build/termux_step_start_build.sh +++ b/scripts/build/termux_step_start_build.sh @@ -2,7 +2,7 @@ termux_step_start_build() { TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_COMMON_CACHEDIR/android-r${TERMUX_NDK_VERSION}-api-${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" # shellcheck source=/dev/null source "$TERMUX_PKG_BUILDER_SCRIPT"