Skip to content

Commit

Permalink
Correct types of mode bit constants on Fuchsia
Browse files Browse the repository at this point in the history
Fuchsia's definitions of these constants were split from the unix impls
before rust-lang#503, and so S_ISUID, S_ISGID, and S_ISVTX are all incorrectly
typed as c_int instead of mode_t. This applies the same fix to Fuchsia's
constant definitions to bring them in line with the rest of libc.
  • Loading branch information
David Koloski committed Jun 10, 2024
1 parent ca70695 commit 6924fcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,9 @@ pub const GRPQUOTA: ::c_int = 1;

pub const SIGIOT: ::c_int = 6;

pub const S_ISUID: ::c_int = 0x800;
pub const S_ISGID: ::c_int = 0x400;
pub const S_ISVTX: ::c_int = 0x200;
pub const S_ISUID: ::mode_t = 0x800;
pub const S_ISGID: ::mode_t = 0x400;
pub const S_ISVTX: ::mode_t = 0x200;

pub const IF_NAMESIZE: ::size_t = 16;
pub const IFNAMSIZ: ::size_t = IF_NAMESIZE;
Expand Down

0 comments on commit 6924fcc

Please sign in to comment.