File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ petgraph = { workspace = true }
98
98
phf = { workspace = true }
99
99
rand = { workspace = true , features = [" default" ] }
100
100
ref-cast = { workspace = true }
101
- rtnetlink = { workspace = true }
102
101
serde = { workspace = true , features = [" default" ] }
103
102
serde_json = { workspace = true }
104
103
socket2 = { workspace = true }
@@ -123,6 +122,9 @@ zenoh-runtime = { workspace = true }
123
122
zenoh-task = { workspace = true }
124
123
once_cell = { workspace = true }
125
124
125
+ [target .'cfg(target_os = "linux")' .dependencies ]
126
+ rtnetlink = { workspace = true }
127
+
126
128
[dev-dependencies ]
127
129
tokio = { workspace = true }
128
130
Original file line number Diff line number Diff line change 18
18
//!
19
19
//! [Click here for Zenoh's documentation](https://docs.rs/zenoh/latest/zenoh)
20
20
mod adminspace;
21
- #[ cfg( unix ) ]
21
+ #[ cfg( target_os = "linux" ) ]
22
22
mod netlink;
23
23
pub mod orchestrator;
24
24
mod scouting;
@@ -83,7 +83,7 @@ use crate::{
83
83
GIT_VERSION , LONG_VERSION ,
84
84
} ;
85
85
86
- #[ cfg( unix ) ]
86
+ #[ cfg( target_os = "linux" ) ]
87
87
const NETLINK_TIMEOUT : Duration = Duration :: from_millis ( 500 ) ;
88
88
89
89
pub ( crate ) struct RuntimeState {
@@ -256,7 +256,7 @@ impl RuntimeBuilder {
256
256
zenoh_config:: ShmInitMode :: Lazy => { }
257
257
} ;
258
258
259
- #[ cfg( unix ) ]
259
+ #[ cfg( target_os = "linux" ) ]
260
260
runtime. spawn ( {
261
261
let netlink_monitor = netlink:: NetlinkMonitor :: new ( ) ?;
262
262
let runtime2 = runtime. clone ( ) ;
@@ -390,7 +390,7 @@ impl Runtime {
390
390
self . state . pending_connections . lock ( ) . await . remove ( zid)
391
391
}
392
392
393
- #[ cfg( unix ) ]
393
+ #[ cfg( target_os = "linux" ) ]
394
394
async fn monitor_netlink_socket ( & self , mut netlink : netlink:: NetlinkMonitor ) {
395
395
fn add_addr_to_set (
396
396
message : & AddressMessage ,
You can’t perform that action at this time.
0 commit comments