Skip to content

Commit d39c2ce

Browse files
rvqlkylewanginchina
authored andcommitted
fix: windows compile
1 parent 58cd55b commit d39c2ce

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

agent/crates/public/src/utils/net/windows.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
*/
1616

1717
use std::{
18-
ffi::CStr,
1918
net::{IpAddr, Ipv4Addr, Ipv6Addr},
2019
ptr,
2120
};
2221

23-
use log::{debug, trace, warn};
22+
use log::{debug, warn};
2423
use pcap;
2524
use regex::Regex;
2625
use windows::Win32::{

agent/src/config/handler.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17+
#[cfg(any(target_os = "linux", target_os = "android"))]
18+
use std::io;
1719
use std::{
1820
borrow::Cow,
1921
cmp::{max, min},
2022
collections::{HashMap, HashSet},
2123
fmt,
2224
hash::{Hash, Hasher},
23-
io, iter,
25+
iter,
2426
net::{IpAddr, Ipv4Addr, Ipv6Addr},
2527
path::PathBuf,
2628
str,

agent/src/dispatcher/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ impl DispatcherBuilder {
10201020
.dispatcher_config
10211021
.take()
10221022
.ok_or(Error::ConfigIncomplete("no dispatcher config".into()))?;
1023+
#[cfg(target_os = "linux")]
10231024
let inner_interface_capture_enabled =
10241025
dispatcher_config.load().inner_interface_capture_enabled;
10251026

agent/src/trident.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,6 +2787,8 @@ impl AgentComponents {
27872787
);
27882788
(proc_event_sender, proc_event_uniform_sender)
27892789
};
2790+
#[cfg(all(not(unix), feature = "libtrace"))]
2791+
let _ = proc_event_sender;
27902792

27912793
let profile_queue_name = "1-profile-to-sender";
27922794
let (profile_sender, profile_receiver, counter) = queue::bounded_with_debug(

0 commit comments

Comments
 (0)