Skip to content

Commit

Permalink
Fix compilation on non-Linux unix platform
Browse files Browse the repository at this point in the history
e.g. Android
  • Loading branch information
sorz committed Apr 15, 2021
1 parent 6aea5eb commit 1b4a7c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ use tokio::{
net::{TcpListener, TcpStream},
};

#[cfg(unix)]
use moproxy::futures_stream::UnixListenerStream;
#[cfg(all(feature = "systemd", target_os = "linux"))]
use moproxy::linux::systemd;
#[cfg(target_os = "linux")]
use moproxy::linux::tcp::set_congestion;
#[cfg(feature = "web_console")]
use moproxy::web;
use moproxy::{
Expand All @@ -30,8 +34,6 @@ use moproxy::{
monitor::{Monitor, ServerList},
proxy::{ProxyProto, ProxyServer, UserPassAuthCredential},
};
#[cfg(target_os = "linux")]
use moproxy::{futures_stream::UnixListenerStream, linux::tcp::set_congestion};

trait FromOptionStr<E, T: FromStr<Err = E>> {
fn parse(&self) -> Result<Option<T>, E>;
Expand Down

0 comments on commit 1b4a7c9

Please sign in to comment.