Skip to content

[Backport 2.32-maintenance] libutil: link ntdll on Windows - #16605

Merged
Ericson2314 merged 1 commit into
2.32-maintenancefrom
backport-16306-to-2.32-maintenance
Oct 14, 2026
Merged

Ericson2314 merged 1 commit into
2.32-maintenancefrom
backport-16306-to-2.32-maintenance

Conversation

@internal-nix-ci

Copy link
Copy Markdown

Automatic backport to 2.32-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
@Ericson2314
Ericson2314 disabled auto-merge October 14, 2026 11:15
@Ericson2314
Ericson2314 merged commit b1cad01 into 2.32-maintenance Oct 14, 2026
14 checks passed
@Ericson2314
Ericson2314 deleted the backport-16306-to-2.32-maintenance branch October 14, 2026 11:15
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