verify arpa_inet includes

This commit is contained in:
auronandace
2026-02-03 09:11:29 +00:00
parent 38e1aeddb8
commit 38a6cd5359
4 changed files with 33 additions and 1 deletions
+18 -1
View File
@@ -1,5 +1,22 @@
sys_includes = ["stddef.h", "sys/socket.h", "netinet/in.h"]
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html
#
# Spec quotations relating to includes:
# - "The <arpa/inet.h> header shall define the in_port_t and in_addr_t types as described in <netinet/in.h> and the socklen_t type as defined in <sys/socket.h>."
# - "The <arpa/inet.h> header shall define the in_addr structure as described in <netinet/in.h>."
# - "The <arpa/inet.h> header shall define the INET_ADDRSTRLEN [IP6] and INET6_ADDRSTRLEN macros as described in <netinet/in.h>."
# - "The <arpa/inet.h> header shall define the uint32_t and uint16_t types as described in <inttypes.h>."
# - "Inclusion of the <arpa/inet.h> header may also make visible all symbols from <netinet/in.h> and <inttypes.h>."
#
# features.h included for #[deprecated] annotation
sys_includes = [
"inttypes.h",
"netinet/in.h",
"features.h"
]
include_guard = "_ARPA_INET_H"
after_includes = """
#include <bits/socklen-t.h> // for socklen_t
"""
language = "C"
style = "Tag"
no_includes = true
+12
View File
@@ -0,0 +1,12 @@
sys_includes = []
include_guard = "_RELIBC_BITS_SOCKLEN_T_H"
language = "C"
style = "type"
no_includes = true
cpp_compat = true
[export]
include = [
"socklen_t"
]
[enum]
prefix_with_name = true
+1
View File
@@ -0,0 +1 @@
pub type socklen_t = u32;
+2
View File
@@ -8,6 +8,8 @@ pub mod assert;
pub mod bits_locale_t;
pub mod bits_pthread;
pub mod bits_sched;
#[path = "bits_socklen-t/mod.rs"]
pub mod bits_socklen_t;
// complex.h implemented in C
// cpio.h implemented in C
pub mod crypt;