fix(rust): patch unsupported dlopen flag

This commit is contained in:
Jonathan LEI 2023-01-02 17:39:19 +00:00 committed by Yaksh Bariya
parent 0fa146fd5a
commit af7d410f33
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Systems programming language focused on safety, speed an
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.66.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-$TERMUX_PKG_VERSION-src.tar.xz
TERMUX_PKG_SHA256=0dc176e34fae9871f855a6ba4cb30fa19d69c5b4428d29281a07419c4950715c
_LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)

View File

@ -0,0 +1,13 @@
--- a/src/tools/rust-analyzer/crates/proc-macro-srv/src/dylib.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-srv/src/dylib.rs
@@ -71,9 +71,8 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> {
use std::os::raw::c_int;
const RTLD_NOW: c_int = 0x00002;
- const RTLD_DEEPBIND: c_int = 0x00008;
- unsafe { UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) }
+ unsafe { UnixLibrary::open(Some(file), RTLD_NOW).map(|lib| lib.into()) }
}
#[derive(Debug)]