Skip to content

Commit 931a055

Browse files
authored
Merge pull request #844 from Dstack-TEE/codex/fix-simulator-fuse-soname
fix(simulator): support current FUSE soname
2 parents c64370c + f01de7e commit 931a055

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • dstack/tee-simulator/src

dstack/tee-simulator/src/nsm.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ fn cuse() -> &'static CuseApi {
8686
}
8787

8888
unsafe fn load_cuse() -> Result<CuseApi> {
89-
let library = Box::leak(Box::new(libloading::Library::new("libfuse3.so.3")?));
89+
// FUSE 3.18 bumped the shared-library SONAME to 4. Keep the older SONAME
90+
// fallback so development binaries also run on distributions that still
91+
// ship the previous ABI.
92+
let library = libloading::Library::new("libfuse3.so.4")
93+
.or_else(|_| libloading::Library::new("libfuse3.so.3"))?;
94+
let library = Box::leak(Box::new(library));
9095
Ok(CuseApi {
9196
main: *library.get(b"cuse_lowlevel_main\0")?,
9297
reply_open: *library.get(b"fuse_reply_open\0")?,

0 commit comments

Comments
 (0)