mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 06:40:47 +00:00
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 `have-strchr` feature to disable including `strchr` (#2096)
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
@ -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 = [
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user