From 2c4bd8d06182af7de0acb7707acbb475d15fbdf1 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Mon, 21 Jul 2025 00:15:02 +0000 Subject: [PATCH] Fix grp.h and gid_t/uid_t for Go --- include/sys/types_internal.h | 4 ++-- src/header/grp/cbindgen.toml | 2 +- src/platform/types.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sys/types_internal.h b/include/sys/types_internal.h index 9df164ec2a..dd8cb0006e 100644 --- a/include/sys/types_internal.h +++ b/include/sys/types_internal.h @@ -5,8 +5,8 @@ typedef long blksize_t; typedef long dev_t; typedef unsigned long ino_t; -typedef int gid_t; -typedef int uid_t; +typedef unsigned int gid_t; +typedef unsigned int uid_t; typedef int mode_t; typedef unsigned long nlink_t; typedef long long off_t; diff --git a/src/header/grp/cbindgen.toml b/src/header/grp/cbindgen.toml index 4a2e9f2cf0..33138caf50 100644 --- a/src/header/grp/cbindgen.toml +++ b/src/header/grp/cbindgen.toml @@ -1,4 +1,4 @@ -sys_includes = [] +sys_includes = ["sys/types.h", "stdint.h"] include_guard = "_RELIBC_GRP_H" language = "C" style = "Tag" diff --git a/src/platform/types.rs b/src/platform/types.rs index a6fdf693b5..999a9505d5 100644 --- a/src/platform/types.rs +++ b/src/platform/types.rs @@ -61,8 +61,8 @@ pub type mode_t = c_int; pub type time_t = c_longlong; pub type pid_t = c_int; pub type id_t = c_uint; -pub type gid_t = c_int; -pub type uid_t = c_int; +pub type gid_t = c_uint; +pub type uid_t = c_uint; pub type dev_t = c_long; pub type ino_t = c_ulonglong; pub type nlink_t = c_ulong;