Skip to content

missing value ICANON and TCSANOW for nuttx targets #5639

Open

Description

@Wyvern

rustc 1.101.0-nightly (8006091eb 2026-10-17)
build with -Zbuild-std
affected targets: nuttx

error[: cannot find value `ICANON` in crate `libc`
    ╭▸ src/util.rs:214:32
    │
214 │         new.c_lflag &= !(libc::ICANON | libc::ECHO);
    ╰╴                               ━━━━━━ not found in `libc`
error[: cannot find value `ECHO` in crate `libc`
    ╭▸ src/util.rs:214:47
    │
214 │         new.c_lflag &= !(libc::ICANON | libc::ECHO);
    ╰╴                                              ━━━━ not found in `libc`
error[: cannot find value `TCSANOW` in crate `libc`
    ╭▸ src/util.rs:215:35
    │
215 │         libc::tcsetattr(fd, libc::TCSANOW, &new);
    ╰╴                                  ━━━━━━━ not found in `libc`
error[: cannot find value `TCSANOW` in crate `libc`
    ╭▸ src/util.rs:222:35
    │
222 │         libc::tcsetattr(fd, libc::TCSANOW, old.as_ptr());
    ╰╴                                  ━━━━━━━ not found in `libc`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `img` (bin "img") due to 4 previous errors

Activity

  1. Wyvern commented on Oct 21, 2026

    @Wyvern
    Author

    we can confirm nuttx has these constants defined

    Constant	NuttX definition	Value
    ICANON	#define ICANON (1 << 1)	2
    ECHO	#define ECHO (1 << 3)	8
    TCSANOW	#define TCSANOW 0	0
    

    from here: https://github.com/apache/nuttx/blob/master/include/termios.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions