File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,3 +29,6 @@ wasm-bindgen-test = "0.3.46"
2929
3030[features ]
3131ssh-encoding = [" dep:ssh-encoding" ]
32+
33+ [lints .rust ]
34+ unexpected_cfgs = { level = " warn" , check-cfg = [' cfg(target_os, values("motor"))' ] }
Original file line number Diff line number Diff line change @@ -3,21 +3,24 @@ mod windows;
33
44#[ cfg( not( windows) ) ]
55#[ cfg( not( target_arch = "wasm32" ) ) ]
6+ #[ cfg( not( target_os = "motor" ) ) ]
67mod unix;
78
8- #[ cfg( target_arch = "wasm32" ) ]
9+ // Motor OS has no memory-locking API; it uses the wasm no-op implementation.
10+ #[ cfg( any( target_arch = "wasm32" , target_os = "motor" ) ) ]
911mod wasm;
1012
1113// Re-export functions based on the platform
1214#[ cfg( not( windows) ) ]
1315#[ cfg( not( target_arch = "wasm32" ) ) ]
16+ #[ cfg( not( target_os = "motor" ) ) ]
1417pub use unix:: { mlock, munlock} ;
15- #[ cfg( target_arch = "wasm32" ) ]
18+ #[ cfg( any ( target_arch = "wasm32" , target_os = "motor" ) ) ]
1619pub use wasm:: { mlock, munlock} ;
1720#[ cfg( windows) ]
1821pub use windows:: { mlock, munlock} ;
1922
20- #[ cfg( not( target_arch = "wasm32" ) ) ]
23+ #[ cfg( not( any ( target_arch = "wasm32" , target_os = "motor" ) ) ) ]
2124mod error {
2225 use std:: error:: Error ;
2326 use std:: fmt:: Display ;
@@ -56,5 +59,5 @@ mod error {
5659 impl Error for MemoryLockError { }
5760}
5861
59- #[ cfg( not( target_arch = "wasm32" ) ) ]
62+ #[ cfg( not( any ( target_arch = "wasm32" , target_os = "motor" ) ) ) ]
6063pub use error:: MemoryLockError ;
You can’t perform that action at this time.
0 commit comments