From a702cb95553e4d3a5ec91bc31a85f77b56253e55 Mon Sep 17 00:00:00 2001 From: auronandace Date: Tue, 2 Dec 2025 20:24:05 +0000 Subject: [PATCH 1/2] only imported needed types in dlfcn --- src/header/dlfcn/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/header/dlfcn/mod.rs b/src/header/dlfcn/mod.rs index a22d88f0b2..c4bcf99597 100644 --- a/src/header/dlfcn/mod.rs +++ b/src/header/dlfcn/mod.rs @@ -18,7 +18,7 @@ use crate::{ linker::{DlError, ObjectHandle, Resolve, ScopeKind}, tcb::Tcb, }, - platform::types::*, + platform::types::{c_char, c_int, c_void}, }; pub const RTLD_LAZY: c_int = 1 << 0; From 5e6c9b886870dc0e4692c73a3dd0585efab4b40e Mon Sep 17 00:00:00 2001 From: auronandace Date: Tue, 2 Dec 2025 20:26:28 +0000 Subject: [PATCH 2/2] make Dl_info_t the type and Dl_info the alias --- src/header/dlfcn/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/header/dlfcn/mod.rs b/src/header/dlfcn/mod.rs index c4bcf99597..f575e1f771 100644 --- a/src/header/dlfcn/mod.rs +++ b/src/header/dlfcn/mod.rs @@ -41,7 +41,7 @@ fn set_last_error(error: DlError) { /// See . #[repr(C)] #[allow(non_camel_case_types)] -pub struct Dl_info { +pub struct Dl_info_t { dli_fname: *const c_char, dli_fbase: *mut c_void, dli_sname: *const c_char, @@ -49,7 +49,7 @@ pub struct Dl_info { } /// alias as per spec update: https://www.austingroupbugs.net/view.php?id=1847 -pub type Dl_info_t = Dl_info; +pub type Dl_info = Dl_info_t; /// See . #[unsafe(no_mangle)]