diff --git a/src/lib.rs b/src/lib.rs index 0b6f097..9ee4547 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -510,7 +510,7 @@ impl Default for Callbacks { } } -#[cfg(debug_assertions)] +#[cfg(all(debug_assertions, unix))] pub extern "C" fn is_rdynamic_linking() -> bool { unsafe { // Get a function pointer to itself @@ -524,6 +524,12 @@ pub extern "C" fn is_rdynamic_linking() -> bool { } } +#[cfg(any(not(debug_assertions), not(unix)))] +pub extern "C" fn is_rdynamic_linking() -> bool { + // On Windows or in release builds, return a default value + true +} + pub mod prelude { pub use crate::{BuildScriptingRuntime as _, Runtime as _, Script}; }