Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
pub const SIG_ERR: sighandler_t = !0 as sighandler_t;

cfg_if! {
if #[cfg(all(not(target_os = "nto"), not(target_os = "aix")))] {
if #[cfg(all(
not(target_os = "nto"),
not(target_os = "aix"),
not(target_os = "espidf")
))] {
pub const DT_UNKNOWN: u8 = 0;
pub const DT_FIFO: u8 = 1;
pub const DT_CHR: u8 = 2;
Expand Down
11 changes: 11 additions & 0 deletions src/unix/newlib/espidf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ pub const NSIG: size_t = 32;

pub const SOMAXCONN: c_int = 128;

pub const DT_UNKNOWN: u8 = 0;
pub const DT_REG: u8 = 1;
pub const DT_DIR: u8 = 2;
// Not used by esp-idf, but still defined in headers.
pub const DT_CHR: u8 = 4;
pub const DT_BLK: u8 = 6;
pub const DT_FIFO: u8 = 8;
pub const DT_LNK: u8 = 10;
pub const DT_SOCK: u8 = 12;
pub const DT_WHT: u8 = 14;

extern "C" {
pub fn pthread_create(
native: *mut crate::pthread_t,
Expand Down