split out sa_family_t to a bits header
This commit is contained in:
@@ -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 = """
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user