add missing socket constants
This commit is contained in:
parent
21101f9b3c
commit
9f5766fb3f
|
@ -78,6 +78,7 @@ fn main() {
|
|||
cfg.header("netinet/in.h");
|
||||
cfg.header("netinet/ip.h");
|
||||
cfg.header("netinet/tcp.h");
|
||||
cfg.header("netinet/udp.h");
|
||||
cfg.header("resolv.h");
|
||||
cfg.header("pthread.h");
|
||||
cfg.header("dlfcn.h");
|
||||
|
@ -150,6 +151,7 @@ fn main() {
|
|||
cfg.header("malloc/malloc.h");
|
||||
cfg.header("util.h");
|
||||
cfg.header("sys/xattr.h");
|
||||
cfg.header("sys/sys_domain.h");
|
||||
if target.starts_with("x86") {
|
||||
cfg.header("crt_externs.h");
|
||||
}
|
||||
|
@ -200,6 +202,7 @@ fn main() {
|
|||
cfg.header("sys/personality.h");
|
||||
cfg.header("sys/swap.h");
|
||||
cfg.header("pty.h");
|
||||
cfg.header("linux/netfilter_ipv4.h");
|
||||
if !uclibc {
|
||||
cfg.header("sys/sysinfo.h");
|
||||
}
|
||||
|
|
|
@ -889,6 +889,10 @@ pub const AF_PPP: ::c_int = 34;
|
|||
pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
|
||||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = 40;
|
||||
pub const AF_SYS_CONTROL: ::c_int = 2;
|
||||
|
||||
pub const SYSPROTO_EVENT: ::c_int = 1;
|
||||
pub const SYSPROTO_CONTROL: ::c_int = 2;
|
||||
|
||||
pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
|
||||
pub const PF_LOCAL: ::c_int = AF_LOCAL;
|
||||
|
@ -946,13 +950,6 @@ pub const SOCK_DGRAM: ::c_int = 2;
|
|||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const SOCK_RDM: ::c_int = 4;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IP_TTL: ::c_int = 4;
|
||||
pub const IP_HDRINCL: ::c_int = 2;
|
||||
pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
|
||||
|
@ -975,6 +972,7 @@ pub const SO_LINGER: ::c_int = 0x0080;
|
|||
pub const SO_OOBINLINE: ::c_int = 0x0100;
|
||||
pub const SO_REUSEPORT: ::c_int = 0x0200;
|
||||
pub const SO_TIMESTAMP: ::c_int = 0x0400;
|
||||
pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800;
|
||||
pub const SO_DONTTRUNC: ::c_int = 0x2000;
|
||||
pub const SO_WANTMORE: ::c_int = 0x4000;
|
||||
pub const SO_WANTOOBFLAG: ::c_int = 0x8000;
|
||||
|
@ -986,11 +984,17 @@ pub const SO_SNDTIMEO: ::c_int = 0x1005;
|
|||
pub const SO_RCVTIMEO: ::c_int = 0x1006;
|
||||
pub const SO_ERROR: ::c_int = 0x1007;
|
||||
pub const SO_TYPE: ::c_int = 0x1008;
|
||||
pub const SO_LABEL: ::c_int = 0x1010;
|
||||
pub const SO_PEERLABEL: ::c_int = 0x1011;
|
||||
pub const SO_NREAD: ::c_int = 0x1020;
|
||||
pub const SO_NKE: ::c_int = 0x1021;
|
||||
pub const SO_NOSIGPIPE: ::c_int = 0x1022;
|
||||
pub const SO_NOADDRERR: ::c_int = 0x1023;
|
||||
pub const SO_NWRITE: ::c_int = 0x1024;
|
||||
pub const SO_REUSESHAREUID: ::c_int = 0x1025;
|
||||
pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026;
|
||||
pub const SO_RANDOMPORT: ::c_int = 0x1082;
|
||||
pub const SO_NP_EXTENSIONS: ::c_int = 0x1083;
|
||||
|
||||
pub const MSG_OOB: ::c_int = 0x1;
|
||||
pub const MSG_PEEK: ::c_int = 0x2;
|
||||
|
@ -1008,7 +1012,6 @@ pub const MSG_HAVEMORE: ::c_int = 0x2000;
|
|||
pub const MSG_RCVMORE: ::c_int = 0x4000;
|
||||
// pub const MSG_COMPAT: ::c_int = 0x8000;
|
||||
|
||||
pub const SCM_RIGHTS: ::c_int = 0x01;
|
||||
pub const SCM_TIMESTAMP: ::c_int = 0x02;
|
||||
pub const SCM_CREDS: ::c_int = 0x03;
|
||||
|
||||
|
|
|
@ -591,6 +591,8 @@ pub const MSG_WAITALL: ::c_int = 0x00000040;
|
|||
pub const MSG_DONTWAIT: ::c_int = 0x00000080;
|
||||
pub const MSG_EOF: ::c_int = 0x00000100;
|
||||
|
||||
pub const SCM_TIMESTAMP: ::c_int = 0x02;
|
||||
|
||||
pub const SOCK_STREAM: ::c_int = 1;
|
||||
pub const SOCK_DGRAM: ::c_int = 2;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
|
@ -599,13 +601,6 @@ pub const SOCK_SEQPACKET: ::c_int = 5;
|
|||
pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
|
||||
pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
|
||||
pub const SOCK_MAXADDRLEN: ::c_int = 255;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IP_TTL: ::c_int = 4;
|
||||
pub const IP_HDRINCL: ::c_int = 2;
|
||||
pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
|
||||
|
|
|
@ -180,11 +180,17 @@ pub const SIG_SETMASK: ::c_int = 3;
|
|||
pub const SIG_BLOCK: ::c_int = 0x1;
|
||||
pub const SIG_UNBLOCK: ::c_int = 0x2;
|
||||
|
||||
pub const IP_MULTICAST_IF: ::c_int = 9;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
|
||||
pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IPV6_V6ONLY: ::c_int = 27;
|
||||
|
||||
pub const ST_RDONLY: ::c_ulong = 1;
|
||||
|
||||
pub const SCM_RIGHTS: ::c_int = 0x01;
|
||||
|
||||
pub const NCCS: usize = 20;
|
||||
|
||||
pub const O_ACCMODE: ::c_int = 0x3;
|
||||
|
@ -303,6 +309,8 @@ pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
|
|||
pub const LOG_FTP: ::c_int = 11 << 3;
|
||||
pub const LOG_PERROR: ::c_int = 0x20;
|
||||
|
||||
pub const TCP_MAXSEG: ::c_int = 2;
|
||||
|
||||
pub const PIPE_BUF: usize = 512;
|
||||
|
||||
f! {
|
||||
|
|
|
@ -409,13 +409,6 @@ pub const SOCK_DGRAM: ::c_int = 2;
|
|||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const SOCK_RDM: ::c_int = 4;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IP_TTL: ::c_int = 4;
|
||||
pub const IP_HDRINCL: ::c_int = 2;
|
||||
pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
|
||||
|
@ -455,8 +448,6 @@ pub const MSG_MCAST: ::c_int = 0x200;
|
|||
pub const MSG_NOSIGNAL: ::c_int = 0x400;
|
||||
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
|
||||
|
||||
pub const SCM_RIGHTS: ::c_int = 0x01;
|
||||
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8;
|
||||
|
||||
pub const SHUT_RD: ::c_int = 0;
|
||||
|
|
|
@ -537,11 +537,6 @@ pub const AF_UNIX: ::c_int = 9;
|
|||
pub const AF_INET: ::c_int = 1;
|
||||
pub const AF_INET6: ::c_int = 6;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IP_TTL: ::c_int = 4;
|
||||
|
|
|
@ -217,6 +217,13 @@ pub const PRIO_USER: ::c_int = 2;
|
|||
pub const PRIO_MIN: ::c_int = -20;
|
||||
pub const PRIO_MAX: ::c_int = 20;
|
||||
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_UDP: ::c_int = 17;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(dox)] {
|
||||
// on dox builds don't pull in anything
|
||||
|
|
|
@ -464,7 +464,6 @@ pub const SOCK_DGRAM: ::c_int = 2;
|
|||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
|
||||
pub const SOL_SOCKET: ::c_int = 1;
|
||||
pub const SOL_UDP: ::c_int = 17;
|
||||
pub const SOL_SCTP: ::c_int = 132;
|
||||
pub const SOL_IPX: ::c_int = 256;
|
||||
pub const SOL_AX25: ::c_int = 257;
|
||||
|
@ -500,6 +499,7 @@ pub const SO_BINDTODEVICE: ::c_int = 25;
|
|||
pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
pub const SO_SNDBUFFORCE: ::c_int = 32;
|
||||
pub const SO_RCVBUFFORCE: ::c_int = 33;
|
||||
pub const SO_MARK: ::c_int = 36;
|
||||
pub const SO_PROTOCOL: ::c_int = 38;
|
||||
pub const SO_DOMAIN: ::c_int = 39;
|
||||
|
|
|
@ -328,7 +328,6 @@ pub const SO_DETACH_FILTER: ::c_int = 27;
|
|||
pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
|
||||
pub const SO_PEERNAME: ::c_int = 28;
|
||||
pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
|
||||
pub const SO_PEERSEC: ::c_int = 30;
|
||||
pub const SO_SNDBUFFORCE: ::c_int = 31;
|
||||
pub const SO_RCVBUFFORCE: ::c_int = 33;
|
||||
|
|
|
@ -213,7 +213,6 @@ pub const SO_DETACH_FILTER: ::c_int = 27;
|
|||
pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
|
||||
pub const SO_PEERNAME: ::c_int = 28;
|
||||
pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
|
||||
pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
pub const SO_PEERSEC: ::c_int = 31;
|
||||
pub const SO_PASSSEC: ::c_int = 34;
|
||||
|
|
|
@ -211,7 +211,6 @@ pub const SO_DETACH_FILTER: ::c_int = 27;
|
|||
pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
|
||||
pub const SO_PEERNAME: ::c_int = 28;
|
||||
pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
|
||||
pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
pub const SO_PEERSEC: ::c_int = 31;
|
||||
pub const SO_PASSSEC: ::c_int = 34;
|
||||
|
|
|
@ -314,7 +314,6 @@ pub const SO_DETACH_FILTER: ::c_int = 27;
|
|||
pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
|
||||
pub const SO_PEERNAME: ::c_int = 28;
|
||||
pub const SO_TIMESTAMP: ::c_int = 29;
|
||||
pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
|
||||
pub const SO_ACCEPTCONN: ::c_int = 30;
|
||||
pub const SO_PEERSEC: ::c_int = 31;
|
||||
pub const SO_PASSSEC: ::c_int = 34;
|
||||
|
|
|
@ -437,6 +437,7 @@ pub const IFF_DYNAMIC: ::c_int = 0x8000;
|
|||
|
||||
pub const SOL_IP: ::c_int = 0;
|
||||
pub const SOL_TCP: ::c_int = 6;
|
||||
pub const SOL_UDP: ::c_int = 17;
|
||||
pub const SOL_IPV6: ::c_int = 41;
|
||||
pub const SOL_ICMPV6: ::c_int = 58;
|
||||
pub const SOL_RAW: ::c_int = 255;
|
||||
|
@ -553,12 +554,11 @@ pub const MSG_WAITFORONE: ::c_int = 0x10000;
|
|||
pub const MSG_FASTOPEN: ::c_int = 0x20000000;
|
||||
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
|
||||
|
||||
pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
|
||||
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const SOCK_RDM: ::c_int = 4;
|
||||
pub const IP_MULTICAST_IF: ::c_int = 32;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 33;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 34;
|
||||
pub const IP_TTL: ::c_int = 2;
|
||||
|
@ -587,6 +587,7 @@ pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
|
|||
pub const IPV6_V6ONLY: ::c_int = 26;
|
||||
|
||||
pub const SO_DEBUG: ::c_int = 1;
|
||||
pub const SO_ORIGINAL_DST: ::c_int = 80;
|
||||
|
||||
pub const SHUT_RD: ::c_int = 0;
|
||||
pub const SHUT_WR: ::c_int = 1;
|
||||
|
|
|
@ -823,11 +823,6 @@ pub const SOCK_STREAM: ::c_int = 2;
|
|||
pub const SOCK_RAW: ::c_int = 4;
|
||||
pub const SOCK_RDM: ::c_int = 5;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 6;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 17;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 18;
|
||||
pub const IP_TTL: ::c_int = 4;
|
||||
|
|
|
@ -725,11 +725,6 @@ pub const MSG_WAITFORONE: ::c_int = 0x10000;
|
|||
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
|
||||
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 33;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 34;
|
||||
pub const IP_TTL: ::c_int = 2;
|
||||
|
@ -1779,4 +1774,3 @@ cfg_if! {
|
|||
pub use unsupported_target;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue