summaryrefslogtreecommitdiffstats
path: root/vendor/fd-lock/src/sys/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/fd-lock/src/sys/mod.rs
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/fd-lock/src/sys/mod.rs')
-rw-r--r--vendor/fd-lock/src/sys/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/fd-lock/src/sys/mod.rs b/vendor/fd-lock/src/sys/mod.rs
new file mode 100644
index 000000000..3c6391e98
--- /dev/null
+++ b/vendor/fd-lock/src/sys/mod.rs
@@ -0,0 +1,17 @@
+use cfg_if::cfg_if;
+
+cfg_if! {
+ if #[cfg(unix)] {
+ mod unix;
+ pub use unix::*;
+ pub(crate) use std::os::unix::prelude::AsRawFd as AsRaw;
+ } else if #[cfg(windows)] {
+ mod windows;
+ pub use windows::*;
+ #[doc(no_inline)]
+ pub(crate) use std::os::windows::prelude::AsRawHandle as AsRaw;
+ } else {
+ mod unsupported;
+ pub use unsupported;
+ }
+}