Merge branch 'syssocket-structs' into 'master'

remove struct export workaround from sys_socket

See merge request redox-os/relibc!1296
This commit is contained in:
Jeremy Soller
2026-05-10 06:53:29 -06:00
2 changed files with 9 additions and 9 deletions
+7
View File
@@ -41,5 +41,12 @@ cpp_compat = true
[enum]
prefix_with_name = true
[export]
include = [
"linger",
"cmsghdr",
"ucred"
]
[export.rename]
"iovec" = "struct iovec"
+2 -9
View File
@@ -27,9 +27,6 @@ pub struct linger {
pub l_linger: c_int,
}
#[unsafe(no_mangle)]
pub extern "C" fn _cbindgen_export_linger(linger: linger) {}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
#[repr(C)]
#[derive(Debug, CheckVsLibcCrate)]
@@ -52,6 +49,8 @@ pub struct cmsghdr {
pub cmsg_type: c_int,
}
// TODO: `ucred` should be behind _GNU_SOURCE include guard
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/unix.7.html>.
#[repr(C)]
#[derive(Clone, Debug)]
// FIXME: CheckVsLibcCrate
@@ -61,12 +60,6 @@ pub struct ucred {
pub gid: gid_t,
}
#[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 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
#[repr(C)]
#[derive(Default, CheckVsLibcCrate)]