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:
liebman 2024-09-06 02:22:33 -07:00 committed by GitHub
parent 17daa464ba
commit 492e35aa74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `have-strchr` feature to disable including `strchr` (#2096)
### Changed
### Fixed

View File

@ -133,6 +133,7 @@ wifi-default = ["ipv4", "tcp", "udp", "icmp", "igmp", "dns", "dhcpv4"]
defmt = ["dep:defmt", "smoltcp?/defmt", "esp-hal/defmt"]
log = ["dep:log", "esp-hal/log"]
sniffer = ["wifi"]
have-strchr = []
[package.metadata.docs.rs]
features = [

View File

@ -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]
unsafe extern "C" fn strchr(str: *const i8, c: i32) -> *const i8 {
trace!("strchr {:?} {}", str, c);