From 857bb2ae85c200bbf5552674ed7aeb19bef686ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sat, 8 Apr 2023 15:22:54 +0800 Subject: [PATCH] fix error --- lib/process_shared/posix/libc.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/process_shared/posix/libc.rb b/lib/process_shared/posix/libc.rb index f22a799..d82e63b 100644 --- a/lib/process_shared/posix/libc.rb +++ b/lib/process_shared/posix/libc.rb @@ -31,8 +31,11 @@ module ProcessShared File.exists?(File.join(path, helper)) end - ffi_lib File.join(path, helper) - + if defined?(Truffle) + ffi_lib(File.join(::Truffle::Boot.toolchain_paths(:LD_LIBRARY_PATH), 'libgraalvm-llvm.so.1'), File.join(path, helper)) + else + ffi_lib File.join(path, helper) + end [:o_rdwr, :o_creat, :o_excl,