Skip to content

Commit

Permalink
Auto merge of #3142 - connor4312:wasi-irwx, r=JohnTitor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Mar 7, 2023
2 parents da4f8f8 + 4b4cd15 commit 3363d43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3363d43

Please sign in to comment.