summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-07 14:46:33 +0000
committerbors <bors@rust-lang.org>2023-03-07 14:46:33 +0000
commit3363d43574db04c805388566fc1456f9e02ad01d (patch)
tree963a8c885ee3b4d313b949027861ec136be3677e
parentda4f8f82e367c556f889992c66ec89e84c1cbf52 (diff)
parent4b4cd15cef75872808008a15ecb316f6e8a7d061 (diff)
downloadrust-libc-3363d43574db04c805388566fc1456f9e02ad01d.tar.gz
Auto merge of #3142 - connor4312:wasi-irwx, r=JohnTitor
add S_IRWX* constants to wasi It seems like all other platforms have `/S_IRWX[OGU]/`, and the `libc` crate looks for them, but they were missing in WASI.
-rw-r--r--src/wasi.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasi.rs b/src/wasi.rs
index abfebd6439..5234805731 100644
--- a/src/wasi.rs
+++ b/src/wasi.rs
@@ -246,12 +246,15 @@ pub const S_IFREG: mode_t = 32768;
pub const S_IFLNK: mode_t = 40960;
pub const S_IFSOCK: mode_t = 49152;
pub const S_IFMT: mode_t = 57344;
+pub const S_IRWXO: mode_t = 0x7;
pub const S_IXOTH: mode_t = 0x1;
pub const S_IWOTH: mode_t = 0x2;
pub const S_IROTH: mode_t = 0x4;
+pub const S_IRWXG: mode_t = 0x38;
pub const S_IXGRP: mode_t = 0x8;
pub const S_IWGRP: mode_t = 0x10;
pub const S_IRGRP: mode_t = 0x20;
+pub const S_IRWXU: mode_t = 0x1c0;
pub const S_IXUSR: mode_t = 0x40;
pub const S_IWUSR: mode_t = 0x80;
pub const S_IRUSR: mode_t = 0x100;