xref: /rust-libc-0.2.174/src/unix/newlib/arm/mod.rs (revision e2f92909)
1 use crate::prelude::*;
2 
3 pub type clock_t = c_long;
4 pub type wchar_t = u32;
5 
6 s! {
7     pub struct sockaddr {
8         pub sa_family: crate::sa_family_t,
9         pub sa_data: [c_char; 14],
10     }
11 
12     pub struct sockaddr_in6 {
13         pub sin6_family: crate::sa_family_t,
14         pub sin6_port: crate::in_port_t,
15         pub sin6_flowinfo: u32,
16         pub sin6_addr: crate::in6_addr,
17         pub sin6_scope_id: u32,
18     }
19 
20     pub struct sockaddr_in {
21         pub sin_family: crate::sa_family_t,
22         pub sin_port: crate::in_port_t,
23         pub sin_addr: crate::in_addr,
24         pub sin_zero: [u8; 8],
25     }
26 
27     pub struct sockaddr_storage {
28         pub ss_family: crate::sa_family_t,
29         pub __ss_padding: [u8; 26],
30     }
31 }
32 
33 pub const AF_INET6: c_int = 23;
34 
35 pub const FIONBIO: c_ulong = 1;
36 
37 pub const POLLIN: c_short = 0x1;
38 pub const POLLPRI: c_short = 0x2;
39 pub const POLLHUP: c_short = 0x4;
40 pub const POLLERR: c_short = 0x8;
41 pub const POLLOUT: c_short = 0x10;
42 pub const POLLNVAL: c_short = 0x20;
43 
44 pub const SOL_SOCKET: c_int = 65535;
45 
46 pub const MSG_OOB: c_int = 1;
47 pub const MSG_PEEK: c_int = 2;
48 pub const MSG_DONTWAIT: c_int = 4;
49 pub const MSG_DONTROUTE: c_int = 0;
50 pub const MSG_WAITALL: c_int = 0;
51 pub const MSG_MORE: c_int = 0;
52 pub const MSG_NOSIGNAL: c_int = 0;
53 
54 pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};
55