Merge branch 'socklen-t-dedup' into 'master'

remove duplicate socklen_t definition

See merge request redox-os/relibc!1081
This commit is contained in:
Jeremy Soller
2026-03-11 07:22:24 -06:00
8 changed files with 28 additions and 10 deletions
+2 -1
View File
@@ -10,9 +10,10 @@ use core::{
use crate::{
c_str::CStr,
header::{
bits_socklen_t::socklen_t,
errno::{EAFNOSUPPORT, ENOSPC},
netinet_in::{INADDR_NONE, in_addr, in_addr_t, ntohl},
sys_socket::{constants::AF_INET, socklen_t},
sys_socket::constants::AF_INET,
},
platform::{
self,
+2 -1
View File
@@ -10,13 +10,14 @@ use crate::{
};
use crate::header::{
bits_socklen_t::socklen_t,
bits_time::timespec,
errno::*,
netinet_in::{IPPROTO_UDP, htons, in_addr, sockaddr_in},
sys_socket::{
self,
constants::{AF_INET, SOCK_DGRAM},
sockaddr, socklen_t,
sockaddr,
},
time,
};
+2 -1
View File
@@ -13,12 +13,13 @@ use crate::{
error::ResultExt,
header::{
arpa_inet::inet_aton,
bits_socklen_t::socklen_t,
errno::*,
fcntl::O_RDONLY,
netinet_in::{htons, in_addr, ntohl, sockaddr_in, sockaddr_in6},
stdlib::atoi,
strings::strcasecmp,
sys_socket::{constants::AF_INET, sa_family_t, sockaddr, socklen_t},
sys_socket::{constants::AF_INET, sa_family_t, sockaddr},
unistd::SEEK_SET,
},
platform::{
+3
View File
@@ -1,5 +1,8 @@
sys_includes = ["stddef.h", "stdint.h", "sys/types.h", "sys/uio.h"]
include_guard = "_SYS_SOCKET_H"
after_includes = """
#include <bits/socklen-t.h> // for socklen_t
"""
trailer = "#include <bits/sys/socket.h>"
language = "C"
style = "Tag"
+1 -2
View File
@@ -6,7 +6,7 @@ use core::{mem, ptr};
use crate::{
error::ResultExt,
header::sys_uio::iovec,
header::{bits_socklen_t::socklen_t, sys_uio::iovec},
platform::{
PalSocket, Sys,
types::{
@@ -18,7 +18,6 @@ use crate::{
pub mod constants;
pub type sa_family_t = u16;
pub type socklen_t = u32;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
#[repr(C)]