std: fix linux uid_t, use uid_t/gid_t in std.os
- correct uid_t from i32 to u32 on linux - define uid_t and gid_t for OSes missing definitions - use uid_t/gid_t instead of plain u32s throughout std.os
This commit is contained in:
@@ -578,8 +578,8 @@ fn testWindowsCmdLine(input_cmd_line: [*]const u8, expected_args: []const []cons
|
||||
}
|
||||
|
||||
pub const UserInfo = struct {
|
||||
uid: u32,
|
||||
gid: u32,
|
||||
uid: os.uid_t,
|
||||
gid: os.gid_t,
|
||||
};
|
||||
|
||||
/// POSIX function which gets a uid from username.
|
||||
@@ -607,8 +607,8 @@ pub fn posixGetUserInfo(name: []const u8) !UserInfo {
|
||||
var buf: [std.mem.page_size]u8 = undefined;
|
||||
var name_index: usize = 0;
|
||||
var state = State.Start;
|
||||
var uid: u32 = 0;
|
||||
var gid: u32 = 0;
|
||||
var uid: os.uid_t = 0;
|
||||
var gid: os.gid_t = 0;
|
||||
|
||||
while (true) {
|
||||
const amt_read = try reader.read(buf[0..]);
|
||||
|
||||
Reference in New Issue
Block a user