ndk-patches: Add IFTODT and DTTOIF to dirent.h (#8041)

ndk-patches: Add IFTODT and DTTOIF to dirent.h
This commit is contained in:
xtkoba 2021-11-23 18:12:17 +09:00 committed by GitHub
parent 9de4baa777
commit 7c228b846e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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"