From d1b3f0d4e361e5a63a63d32d44e9632824edbcfe Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Mon, 16 Oct 2023 21:31:15 +0000 Subject: [PATCH] Update llvm-lib-Support-Unix-Path.inc.patch final!! --- packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch b/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch index 0cc0a02173..7ff6c38749 100644 --- a/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch +++ b/packages/libllvm/llvm-lib-Support-Unix-Path.inc.patch @@ -1,7 +1,7 @@ diff -u -r ../orig-src/llvm/lib/Support/Unix/Path.inc ./llvm/lib/Support/Unix/Path.inc --- ../orig-src/llvm/lib/Support/Unix/Path.inc 2023-09-29 21:36:47.056335287 +0000 +++ ./llvm/lib/Support/Unix/Path.inc 2023-09-29 21:40:31.091417185 +0000 -@@ -250,6 +250,45 @@ +@@ -250,6 +250,44 @@ // If we don't have procfs mounted, fall back to argv[0] if (getprogpath(exe_path, argv0) != NULL) return exe_path; @@ -9,11 +9,11 @@ diff -u -r ../orig-src/llvm/lib/Support/Unix/Path.inc ./llvm/lib/Support/Unix/Pa + if (char *real_path = realpath("/proc/self/exe", nullptr)) { + if (char *real_linker_path = realpath( +#ifdef __LP64__ -+ "/system/bin/linker64", ++ "/system/bin/linker64", +#else + "/system/bin/linker", +#endif -+ nullptr)) { ++ nullptr)) { + if (strcmp(real_path, real_linker_path) != 0) { + free(real_linker_path); + std::string ret = std::string(real_path); @@ -38,8 +38,7 @@ diff -u -r ../orig-src/llvm/lib/Support/Unix/Path.inc ./llvm/lib/Support/Unix/Pa + } + free(cmd); + } -+ } -+ free(real_path); ++ } else free(real_path); + } + // Fall back to the classical detection. + char exe_path[PATH_MAX];