split out sa_family_t to a bits header

This commit is contained in:
auronandace
2026-04-14 08:44:13 +01:00
parent 022f040f05
commit b0c66cf470
8 changed files with 30 additions and 6 deletions
+1
View File
@@ -2,6 +2,7 @@ sys_includes = ["stddef.h", "stdint.h", "sys/types.h"]
include_guard = "_RELIBC_SYS_SOCKET_H"
after_includes = """
#include <bits/iovec.h> // for iovec from sys/uio.h
#include <bits/safamily-t.h> // for sa_family_t
#include <bits/socklen-t.h> // for socklen_t
"""
trailer = """
+1 -3
View File
@@ -6,7 +6,7 @@ use core::{mem, ptr};
use crate::{
error::ResultExt,
header::{bits_iovec::iovec, bits_socklen_t::socklen_t},
header::{bits_iovec::iovec, bits_safamily_t::sa_family_t, bits_socklen_t::socklen_t},
platform::{
PalSocket, Sys,
types::{
@@ -17,8 +17,6 @@ use crate::{
pub mod constants;
pub type sa_family_t = u16;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
#[repr(C)]
#[derive(Default, CheckVsLibcCrate)]