diff --git a/src/lib.rs b/src/lib.rs index 1cf099f..83a4172 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,6 @@ #![no_std] -/// Call this somewhere to force Rust to link this module. -/// The call doesn't need to execute, just exist. -/// -/// See +/// Reference this function somewhere (eg. ´use linker_fix_3sd::init´ in the main crate) to import all missing implementations. pub fn init() {} extern "C" { @@ -54,6 +51,7 @@ pub unsafe extern "C" fn getrandom( }; buflen = buflen.min(maxlen); + ctru_sys::psInit(); let ret = ctru_sys::PS_GenerateRandomBytes(buf, buflen); // avoid conflicting a real POSIX errno by using a value < 0