Skip to content

AIX build error: cfmakeraw: expected (), found i32 #1500

@ponchofiesta

Description

@ponchofiesta

I'm trying to build another tool but stumbling upon build problem in rustix 1.0.8. Maybe this is related to libc?

# rustix 1.0.8 repo
bash-5.2$ cargo build --offline -F "std fs termios"
warning: unused manifest key: hints
   Compiling libc v0.2.175
   Compiling rustix v1.0.8 (/data/rust/rustix)
   Compiling bitflags v2.9.1
   Compiling errno v0.3.13
error[E0308]: mismatched types
   --> src/backend/libc/termios/syscalls.rs:496:14
    |
496 |     unsafe { c::cfmakeraw(as_mut_ptr(termios).cast()) }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `i32`
    |
help: consider using a semicolon here
    |
496 |     unsafe { c::cfmakeraw(as_mut_ptr(termios).cast()); }
    |                                                      +
help: try adding a return type
    |
495 | pub(crate) fn cfmakeraw(termios: &mut Termios) -> i32 {
    |                                                ++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustix` (lib) due to 1 previous error

Environment

  • AIX 7300-03-00-2446
  • bash-5.2$ rustc -Vv
    rustc 1.86.0 (a5ebf0b19 2025-05-14) (IBM Open SDK for Rust on AIX 1.86.0.1 (5900-BND, 5765-J24))
    binary: rustc
    commit-hash: a5ebf0b19288d52afd53ab0e9c74134de50d7701
    commit-date: 2025-05-14
    host: powerpc64-ibm-aix
    release: 1.86.0
    edition: (Community Edition)
    LLVM version: 19.1.7
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions