From 4a805ea97ce32c875e0f2a708b3c64312ff17fe7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 4 Aug 2025 19:54:45 -0600 Subject: [PATCH] Add some compatibility defines for libssh --- src/header/fcntl/linux.rs | 3 +++ src/header/fcntl/redox.rs | 3 +++ src/header/sys_stat/mod.rs | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/header/fcntl/linux.rs b/src/header/fcntl/linux.rs index 0779a7ed50..b1e3d42aff 100644 --- a/src/header/fcntl/linux.rs +++ b/src/header/fcntl/linux.rs @@ -15,3 +15,6 @@ pub const O_CLOEXEC: c_int = 0x8_0000; pub const O_PATH: c_int = 0x20_0000; pub const FD_CLOEXEC: c_int = 0x8_0000; + +// Defined for compatibility +pub const O_NDELAY: c_int = O_NONBLOCK; \ No newline at end of file diff --git a/src/header/fcntl/redox.rs b/src/header/fcntl/redox.rs index de3ebe4db2..ba429af995 100644 --- a/src/header/fcntl/redox.rs +++ b/src/header/fcntl/redox.rs @@ -24,3 +24,6 @@ pub const O_NOFOLLOW: c_int = -0x8000_0000; pub const FD_CLOEXEC: c_int = 0x0100_0000; pub const O_NOCTTY: c_int = 0x00000200; + +// Defined for compatibility +pub const O_NDELAY: c_int = O_NONBLOCK; \ No newline at end of file diff --git a/src/header/sys_stat/mod.rs b/src/header/sys_stat/mod.rs index 5b75c31a30..916e494d7a 100644 --- a/src/header/sys_stat/mod.rs +++ b/src/header/sys_stat/mod.rs @@ -25,6 +25,11 @@ pub const S_IRUSR: c_int = 0o0_400; pub const S_IWUSR: c_int = 0o0_200; pub const S_IXUSR: c_int = 0o0_100; +// Defined for compatibility +pub const S_IREAD: c_int = S_IRUSR; +pub const S_IWRITE: c_int = S_IWUSR; +pub const S_IEXEC: c_int = S_IXUSR; + pub const S_IRWXG: c_int = 0o0_070; pub const S_IRGRP: c_int = 0o0_040; pub const S_IWGRP: c_int = 0o0_020;