about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-09 16:41:54 +0100
committerGitHub <noreply@github.com>2025-03-09 16:41:54 +0100
commit33530e4cb9d614c170f90b57d4e748b11e11cfec (patch)
tree9d4f55adf5e7b9e0be1772875a34540becf6de1a /library/std/src
parent1105f4ac990bad75c81d67058a81c7112c44de13 (diff)
parent33c6c3a1e99d7838ff44a275b6eabd32d6c5c52f (diff)
downloadrust-33530e4cb9d614c170f90b57d4e748b11e11cfec.tar.gz
rust-33530e4cb9d614c170f90b57d4e748b11e11cfec.zip
Rollup merge of #138276 - bdbai:fix-uwp-ntopenfile, r=ChrisDenton
Lazy load NtOpenFile for UWP

Lazily load `NtOpenFile` to allow libraries targeting UWP to build and link.

Fixes #138257 .

r? `@ChrisDenton`
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/pal/windows/c.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs
index 40b2bed73c0..004cbee52f6 100644
--- a/library/std/src/sys/pal/windows/c.rs
+++ b/library/std/src/sys/pal/windows/c.rs
@@ -237,6 +237,17 @@ compat_fn_with_fallback! {
         STATUS_NOT_IMPLEMENTED
     }
     #[cfg(target_vendor = "uwp")]
+    pub fn NtOpenFile(
+        filehandle: *mut HANDLE,
+        desiredaccess: u32,
+        objectattributes: *const OBJECT_ATTRIBUTES,
+        iostatusblock: *mut IO_STATUS_BLOCK,
+        shareaccess: u32,
+        openoptions: u32
+    ) -> NTSTATUS {
+        STATUS_NOT_IMPLEMENTED
+    }
+    #[cfg(target_vendor = "uwp")]
     pub fn NtReadFile(
         filehandle: HANDLE,
         event: HANDLE,