Skip to content

Commit 3363d43

Browse files
committed
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.
2 parents da4f8f8 + 4b4cd15 commit 3363d43

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wasi.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,15 @@ pub const S_IFREG: mode_t = 32768;
246246
pub const S_IFLNK: mode_t = 40960;
247247
pub const S_IFSOCK: mode_t = 49152;
248248
pub const S_IFMT: mode_t = 57344;
249+
pub const S_IRWXO: mode_t = 0x7;
249250
pub const S_IXOTH: mode_t = 0x1;
250251
pub const S_IWOTH: mode_t = 0x2;
251252
pub const S_IROTH: mode_t = 0x4;
253+
pub const S_IRWXG: mode_t = 0x38;
252254
pub const S_IXGRP: mode_t = 0x8;
253255
pub const S_IWGRP: mode_t = 0x10;
254256
pub const S_IRGRP: mode_t = 0x20;
257+
pub const S_IRWXU: mode_t = 0x1c0;
255258
pub const S_IXUSR: mode_t = 0x40;
256259
pub const S_IWUSR: mode_t = 0x80;
257260
pub const S_IRUSR: mode_t = 0x100;

0 commit comments

Comments
 (0)