From 121ee8edb0c7a2ed041f838a81e5ed465002ed3b Mon Sep 17 00:00:00 2001 From: auronandace Date: Thu, 9 Apr 2026 09:59:24 +0100 Subject: [PATCH] remove ucred from sys_socket bits --- include/bits/sys/socket.h | 6 ------ src/header/sys_socket/mod.rs | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/bits/sys/socket.h b/include/bits/sys/socket.h index b7a2e57705..99f0d9fe38 100644 --- a/include/bits/sys/socket.h +++ b/include/bits/sys/socket.h @@ -7,12 +7,6 @@ struct sockaddr_storage { unsigned long __ss_align; }; -struct ucred { - pid_t pid; - uid_t uid; - gid_t gid; -}; - // These definitions were taken from musl, license MIT { #define __CMSG_LEN(cmsg) (((cmsg)->cmsg_len + sizeof(long) - 1) & ~(long)(sizeof(long) - 1)) #define __CMSG_NEXT(cmsg) ((unsigned char *)(cmsg) + __CMSG_LEN(cmsg)) diff --git a/src/header/sys_socket/mod.rs b/src/header/sys_socket/mod.rs index ace3526c6a..89c6b29986 100644 --- a/src/header/sys_socket/mod.rs +++ b/src/header/sys_socket/mod.rs @@ -53,7 +53,7 @@ pub struct cmsghdr { } #[repr(C)] -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Debug)] // FIXME: CheckVsLibcCrate pub struct ucred { pub pid: pid_t, @@ -64,6 +64,9 @@ pub struct ucred { #[unsafe(no_mangle)] pub extern "C" fn _cbindgen_export_cmsghdr(cmsghdr: cmsghdr) {} +#[unsafe(no_mangle)] +pub extern "C" fn _cbindgen_export_ucred(ucred: ucred) {} + /// See . #[repr(C)] #[derive(Default, CheckVsLibcCrate)]