Skip to content

[3.32.1 backport] fix: include sys/wait.h on NetBSD in lev_stubs.c (#14512)#14526

Merged
shonfeder merged 1 commit into
ocaml:3.23.1-rcfrom
Leonidas-from-XIV:netbsd-fix-backport
May 14, 2026
Merged

[3.32.1 backport] fix: include sys/wait.h on NetBSD in lev_stubs.c (#14512)#14526
shonfeder merged 1 commit into
ocaml:3.23.1-rcfrom
Leonidas-from-XIV:netbsd-fix-backport

Conversation

@Leonidas-from-XIV

Copy link
Copy Markdown
Member

Backport of #14512 onto 3.32.1

Fixes ocaml#14484.

NetBSD needs the same `<sys/wait.h>` include as FreeBSD and OpenBSD so
that the `WIFEXITED`, `WEXITSTATUS`, `WIFSTOPPED`, `WSTOPSIG` and
`WTERMSIG` macros are available when building `lev_stubs.c`. Without it
the bootstrap fails at link time on NetBSD with undefined references to
these symbols.

```
ld: /home/runner/work/dune/dune/_boot/src/lev/src/lev_stubs.c:515: undefined reference to `WIFEXITED'
ld: …:517: undefined reference to `WEXITSTATUS'
ld: …:518: undefined reference to `WIFSTOPPED'
ld: …:525: undefined reference to `WTERMSIG'
ld: …:521: undefined reference to `WSTOPSIG'
Error: Error during linking (exit code 1)
```
Failing CI run (before the fix):
https://github.com/Alizter/dune/actions/runs/25815321578/job/75842142913?pr=9#step:3:403

Passing NetBSD x86-64 job on this PR (with the fix):
https://github.com/ocaml/dune/actions/runs/25816678888/job/75846908855

Patch suggested by @0-wiz-0 in ocaml#14484.

Signed-off-by: Marek Kubica <marek@tarides.com>
@shonfeder

Copy link
Copy Markdown
Member

There seem to be new CI failures here that persist on rebuilds. Do we know what's up with that?

@Alizter

Alizter commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Not relevant for this change AFAIK #14527

@shonfeder

Copy link
Copy Markdown
Member

Got it. Thanks!

@shonfeder shonfeder merged commit 5b98efb into ocaml:3.23.1-rc May 14, 2026
81 of 87 checks passed
@Leonidas-from-XIV Leonidas-from-XIV deleted the netbsd-fix-backport branch May 15, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants