Skip to content

Commit

Permalink
fix weird undeclared bug?
Browse files Browse the repository at this point in the history
  • Loading branch information
indexds committed Jan 2, 2025
1 parent 973c529 commit 5925165
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/netif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,18 @@ impl EspNetif {
Ok(())
}

#[cfg(esp_idf_lwip_ipv4_napt)]
unsafe extern "C" fn napt_wrapper(ctx: *mut ffi::c_void) {
let ctx = unsafe { *(ctx as *mut (u8, i32)) };
#[cfg(esp_idf_lwip_ipv4_napt)]
{
let ctx = unsafe { *(ctx as *mut (u8, i32)) };

ip_napt_enable_no(ctx.0, ctx.1);
ip_napt_enable_no(ctx.0, ctx.1);
}
}

/// Enables or disables NAPT on this netif.
///
/// Enable operation can be performed only on one interface at a time.
/// Enable operation can be performed only on one interface at a time.
/// NAPT cannot be enabled on multiple interfaces according to this implementation.
#[cfg(esp_idf_lwip_ipv4_napt)]
pub fn enable_napt(&mut self, enable: bool) -> Result<(), EspError> {
Expand Down

0 comments on commit 5925165

Please # to comment.