这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/libuv/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="MIT, BSD 2-Clause, ISC, BSD 3-Clause"
TERMUX_PKG_LICENSE_FILE="LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.48.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://dist.libuv.org/dist/v${TERMUX_PKG_VERSION}/libuv-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7f1db8ac368d89d1baf163bac1ea5fe5120697a73910c8ae6b2fffb3551d59fb
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
22 changes: 22 additions & 0 deletions packages/libuv/src-unix-procfs-exepath.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff -u -r ../libuv-v1.48.0/src/unix/procfs-exepath.c ./src/unix/procfs-exepath.c
--- ../libuv-v1.48.0/src/unix/procfs-exepath.c 2024-02-07 20:20:07.000000000 +0000
+++ ./src/unix/procfs-exepath.c 2024-07-02 10:04:51.745846344 +0000
@@ -26,6 +26,18 @@
#include <unistd.h>

int uv_exepath(char* buffer, size_t* size) {
+#ifdef __ANDROID__
+ char* termux_self_exe = getenv("TERMUX_EXEC__PROC_SELF_EXE");
+ if (termux_self_exe) {
+ size_t n = strlen(termux_self_exe);
+ if (*size > n) {
+ memcpy(buffer, termux_self_exe, n);
+ buffer[n] = '\0';
+ *size = n;
+ return 0;
+ }
+ }
+#endif
ssize_t n;

if (buffer == NULL || size == NULL || *size == 0)