Skip to content

Commit f09decb

Browse files
committed
disentangle macos and linux dlsyms
1 parent 08ddbd6 commit f09decb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/shims/dlsym.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ impl Dlsym {
1515
use self::Dlsym::*;
1616
let name = String::from_utf8_lossy(name);
1717
Ok(match target_os {
18-
"linux" | "macos" => match &*name {
19-
"getentropy" => Some(GetEntropy),
18+
"linux" => match &*name {
2019
"__pthread_get_minstack" => None,
21-
_ => throw_unsup_format!("unsupported dlsym: {}", name),
20+
_ => throw_unsup_format!("unsupported Linux dlsym: {}", name),
21+
}
22+
"macos" => match &*name {
23+
"getentropy" => Some(GetEntropy),
24+
_ => throw_unsup_format!("unsupported macOS dlsym: {}", name),
2225
}
2326
"windows" => match &*name {
2427
"SetThreadStackGuarantee" => None,
2528
"AcquireSRWLockExclusive" => None,
26-
_ => throw_unsup_format!("unsupported dlsym: {}", name),
29+
_ => throw_unsup_format!("unsupported Windows dlsym: {}", name),
2730
}
2831
os => bug!("dlsym not implemented for target_os {}", os),
2932
})

0 commit comments

Comments
 (0)