From f09decb398f86ebfb7938b5aca39202acb50d45e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 21 May 2020 23:00:59 +0200 Subject: [PATCH] disentangle macos and linux dlsyms --- src/shims/dlsym.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shims/dlsym.rs b/src/shims/dlsym.rs index 1416db346cd0..301687092813 100644 --- a/src/shims/dlsym.rs +++ b/src/shims/dlsym.rs @@ -15,15 +15,18 @@ impl Dlsym { use self::Dlsym::*; let name = String::from_utf8_lossy(name); Ok(match target_os { - "linux" | "macos" => match &*name { - "getentropy" => Some(GetEntropy), + "linux" => match &*name { "__pthread_get_minstack" => None, - _ => throw_unsup_format!("unsupported dlsym: {}", name), + _ => throw_unsup_format!("unsupported Linux dlsym: {}", name), + } + "macos" => match &*name { + "getentropy" => Some(GetEntropy), + _ => throw_unsup_format!("unsupported macOS dlsym: {}", name), } "windows" => match &*name { "SetThreadStackGuarantee" => None, "AcquireSRWLockExclusive" => None, - _ => throw_unsup_format!("unsupported dlsym: {}", name), + _ => throw_unsup_format!("unsupported Windows dlsym: {}", name), } os => bug!("dlsym not implemented for target_os {}", os), })