Skip to content

Fix build on Haiku OS - #360

Closed
jedenastka wants to merge 1 commit into
smol-rs:masterfrom
jedenastka:haiku
Closed

Fix build on Haiku OS#360
jedenastka wants to merge 1 commit into
smol-rs:masterfrom
jedenastka:haiku

Conversation

@jedenastka

Copy link
Copy Markdown

This disables async-process on Haiku OS, so smol as a whole is able to build. The same solution seems to be already in place for the espidf target, so I guess this should be okay.

This disables async-process on Haiku OS, so smol as a whole is able to
build. The same solution seems to be already in place for the espidf
target, so I guess this should be okay.
@taiki-e

taiki-e commented Jan 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR, but the correct way to fix the issue is to fix async-signal. Filed smol-rs/async-signal#59.

Looking at the error messages, it should be clear that those from Haiku and ESP-IDF are of entirely different natures.

On Haiku (just lacking SIGIO):

error[E0599]: no associated item named `IO` found for struct `rustix::process::Signal` in the current scope
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-signal-0.2.13/src/lib.rs:137:35
    |
 99 |                 rustix::process::Signal::$rustix_name.as_raw()
    |                                          ------------ due to this macro variable
...
137 |     pub const SIGIO: c_int = sig!(IO, 29);
    |                                   ^^ associated item not found in `rustix::process::Signal`

On ESP-IDF (lacking entirely sig*):

error[E0432]: unresolved import `libc::siginfo_t`
  --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:82:38
   |
82 | use libc::{c_int, c_void, sigaction, siginfo_t};
   |                                      ^^^^^^^^^ no `siginfo_t` in the root

error[E0432]: unresolved imports `libc::SIGKILL`, `libc::SIGSTOP`
  --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:87:28
   |
87 | use libc::{SIGFPE, SIGILL, SIGKILL, SIGSEGV, SIGSTOP};
   |                            ^^^^^^^           ^^^^^^^ no `SIGSTOP` in the root
   |                            |
   |                            no `SIGKILL` in the root
   |                            help: a similar name exists in the module: `SIGILL`

error[E0425]: cannot find value `SA_RESTART` in crate `libc`
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:189:27
    |
189 |         let flags = libc::SA_RESTART;
    |                           ^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `SA_SIGINFO` in crate `libc`
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:192:25
    |
192 |         siginfo = libc::SA_SIGINFO as _;
    |                         ^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `SA_SIGINFO` in crate `libc`
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:270:29
    |
270 |             siginfo = libc::SA_SIGINFO as _;
    |                             ^^^^^^^^^^ not found in `libc`

error[E0609]: no field `sa_sigaction` on type `sigaction`
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:180:13
    |
180 |         new.sa_sigaction = handler as usize; // If it doesn't compile on AIX, upgrade the libc dependency
    |             ^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `sa_handler`, `sa_mask`, `sa_flags`

error[E0609]: no field `sa_sigaction` on type `sigaction`
   --> /Users/taiki/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signal-hook-registry-1.4.6/src/lib.rs:259:30
    |
259 |         let fptr = self.info.sa_sigaction;
    |                              ^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `sa_handler`, `sa_mask`, `sa_flags`

@taiki-e taiki-e closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants