Skip to content

[Backport 2.33-maintenance] libutil: link ntdll on Windows - #16606

Merged
internal-nix-ci[bot] merged 1 commit into
2.33-maintenancefrom
backport-16306-to-2.33-maintenance
Oct 14, 2026
Merged

internal-nix-ci[bot] merged 1 commit into
2.33-maintenancefrom
backport-16306-to-2.33-maintenance

Conversation

@internal-nix-ci

Copy link
Copy Markdown

Automatic backport to 2.33-maintenance, triggered by a label in #16306.

`windows/file-system-at.cc` calls `NtCreateFile` and
`RtlNtStatusToDosError`, which live in `ntdll`, but nothing asked for
that library.

It only happened to link anyway with the GCC from Nixpkgs, because that
one was configured with `--enable-threads=mcf`, whose spec appends
`-lmcfgthread -lkernel32 -lntdll` for the sake of mcfgthreads. A
toolchain that does not do that fails with undefined references to both
symbols.

Now we make sure to link it, and put it in the *.pc files. This follows
the precedent set with `ws2_32`.

Assisted-By: Claude Code (Claude Opus 5)
(cherry picked from commit 4b247ec)
@internal-nix-ci
internal-nix-ci Bot requested a review from edolstra as a code owner October 14, 2026 10:28
@internal-nix-ci
internal-nix-ci Bot enabled auto-merge October 14, 2026 10:28
@internal-nix-ci
internal-nix-ci Bot merged commit 9fb4f25 into 2.33-maintenance Oct 14, 2026
13 checks passed
@internal-nix-ci
internal-nix-ci Bot deleted the backport-16306-to-2.33-maintenance branch October 14, 2026 11:06
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.

1 participant