about summary refs log tree commit diff
path: root/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
blob: b458f7fc29c84e7ba32069e9049edd2be4f43551 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 4bd87f2f3151ad07d311f7d33c2b890977aca93d Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Tue, 20 Sep 2022 18:43:15 +0800
Subject: [PATCH 4/4] ignore absolute path when loading library

---
 cli/loader_lib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cli/loader_lib.c b/cli/loader_lib.c
index 0301b6eed..5cbda61af 100644
--- a/cli/loader_lib.c
+++ b/cli/loader_lib.c
@@ -50,9 +50,7 @@ static void * load_library(const char * rel_path, const char * src_dir, int err)
 #endif
 
     char path[2*JL_PATH_MAX + 1] = {0};
-    strncat(path, src_dir, sizeof(path) - 1);
-    strncat(path, PATHSEPSTRING, sizeof(path) - 1);
-    strncat(path, rel_path, sizeof(path) - 1);
+    strncat(path, basename, sizeof(path) - 1);
 
 #if defined(_OS_WINDOWS_)
     wchar_t wpath[2*JL_PATH_MAX + 1] = {0};
-- 
2.38.1