From 2862e6a089f594ba35ddbf162fd549f78d99846b Mon Sep 17 00:00:00 2001 From: Hugo Hakim Damer Date: Thu, 13 Jun 2024 17:03:28 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat: add esp-idf compilation feature --- libcoap-sys/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libcoap-sys/src/lib.rs b/libcoap-sys/src/lib.rs index e59869b..c2a589a 100644 --- a/libcoap-sys/src/lib.rs +++ b/libcoap-sys/src/lib.rs @@ -86,6 +86,7 @@ #![allow(deref_nullptr)] #![allow(non_snake_case)] +#[cfg(not(feature = "esp"))] use libc::{epoll_event, fd_set, sockaddr, sockaddr_in, sockaddr_in6, socklen_t, time_t, sa_family_t}; // use dtls backend libraries in cases where they set our linker flags, otherwise cargo will @@ -97,12 +98,12 @@ use openssl_sys as _; #[cfg(feature = "dtls_backend_tinydtls")] use tinydtls_sys as _; -#[cfg(target_family = "windows")] +#[cfg(all(target_family = "windows", not(feature = "esp")))] include!(concat!(env!("OUT_DIR"), "\\bindings.rs")); -#[cfg(not(target_family = "windows"))] +#[cfg(all(not(target_family = "windows"), not(feature = "esp")))] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); -#[cfg(test)] +#[cfg(all(test, not(feature = "esp")))] mod tests { use std::{ ffi::c_void,