Skip to content

Commit 0bea3ec

Browse files
committed
fix: compile flag
1 parent 19215a3 commit 0bea3ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clash-lib/src/app/inbound/network_listener.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ fn build_handler(
124124
None
125125
}
126126
}
127-
InboundOpts::Redir { common_opts, .. } => {
127+
#[cfg(feature = "redir")]
128+
InboundOpts::Redir {
129+
#[cfg(target_os = "linux")]
130+
common_opts,
131+
..
132+
} => {
128133
#[cfg(target_os = "linux")]
129134
{
130135
Some(Arc::new(RedirInbound::new(

clash-lib/src/config/internal/listener.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub enum InboundOpts {
3131
common_opts: CommonInboundOpts,
3232
udp: bool,
3333
},
34+
#[cfg(feature = "redir")]
3435
#[serde(alias = "redir")]
3536
Redir {
3637
#[serde(flatten)]

0 commit comments

Comments
 (0)