esp-wifi: other crates also provide strchr (littlefs2-sys) (#2096)
* esp-wifi: other crates also provide strchr (littlefs2-sys) * esp-wifi: other crates also provide strchr (littlefs2-sys) * changelog * fmt :-(
This commit is contained in:
parent
17daa464ba
commit
492e35aa74
@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Added `have-strchr` feature to disable including `strchr` (#2096)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@ -133,6 +133,7 @@ wifi-default = ["ipv4", "tcp", "udp", "icmp", "igmp", "dns", "dhcpv4"]
|
|||||||
defmt = ["dep:defmt", "smoltcp?/defmt", "esp-hal/defmt"]
|
defmt = ["dep:defmt", "smoltcp?/defmt", "esp-hal/defmt"]
|
||||||
log = ["dep:log", "esp-hal/log"]
|
log = ["dep:log", "esp-hal/log"]
|
||||||
sniffer = ["wifi"]
|
sniffer = ["wifi"]
|
||||||
|
have-strchr = []
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = [
|
features = [
|
||||||
|
|||||||
@ -46,6 +46,12 @@ unsafe extern "C" fn strcmp(str1: *const i8, str2: *const i8) -> i32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "have-strchr")]
|
||||||
|
extern "C" {
|
||||||
|
fn strchr(str: *const i8, c: i32) -> *const i8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "have-strchr"))]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
unsafe extern "C" fn strchr(str: *const i8, c: i32) -> *const i8 {
|
unsafe extern "C" fn strchr(str: *const i8, c: i32) -> *const i8 {
|
||||||
trace!("strchr {:?} {}", str, c);
|
trace!("strchr {:?} {}", str, c);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user