whitequark opened PR #1739 from dont-link-to-ntdll to master:
The documentation for
RtlNtStatusToDosErrorexplicitly tells to call it viaGetProcAddress. The documentation forNtQueryInformationFiledoes not, but similar considerations apply because there is normally no import library forntdll.The main reason to use
GetProcAddressthough is because MinGW does include an import library forntdll, this import library contains a definition ofsetjmp, and because of the way rustc orders linker arguments, this definition ofsetjmpconflicts with and gets picked over the one inmsvcrt. Usingsetjmpfrom ntdll is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
Last updated: Dec 06 2025 at 06:05 UTC