Skip to content

Commit bf1b25f

Browse files
committed
fix macos build
1 parent d5bb96a commit bf1b25f

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/network/platform/mod.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,20 @@ impl ProcessLookup for NoOpProcessLookup {
5454

5555
/// Create a platform-specific process lookup with PKTAP status awareness
5656
pub fn create_process_lookup_with_pktap_status(
57-
_pktap_active: bool,
57+
pktap_active: bool,
5858
) -> Result<Box<dyn ProcessLookup>> {
5959
#[cfg(target_os = "macos")]
60-
if _pktap_active {
61-
log::info!("Using no-op process lookup - PKTAP provides process metadata");
62-
return Ok(Box::new(NoOpProcessLookup));
60+
{
61+
use crate::network::platform::macos::MacOSProcessLookup;
62+
63+
if pktap_active {
64+
log::info!("Using no-op process lookup - PKTAP provides process metadata");
65+
Ok(Box::new(NoOpProcessLookup))
66+
} else {
67+
Ok(Box::new(MacOSProcessLookup::new()?))
68+
}
6369
}
70+
6471
#[cfg(target_os = "linux")]
6572
{
6673
#[cfg(feature = "ebpf")]
@@ -88,11 +95,6 @@ pub fn create_process_lookup_with_pktap_status(
8895
Ok(Box::new(WindowsProcessLookup::new()?))
8996
}
9097

91-
#[cfg(target_os = "macos")]
92-
{
93-
Ok(Box::new(MacOSProcessLookup::new()?))
94-
}
95-
9698
#[cfg(not(any(target_os = "linux", target_os = "windows", target_os = "macos")))]
9799
{
98100
Err(anyhow::anyhow!("Unsupported platform"))

0 commit comments

Comments
 (0)