File tree Expand file tree Collapse file tree 7 files changed +70
-22
lines changed
unix/linux_like/linux/gnu Expand file tree Collapse file tree 7 files changed +70
-22
lines changed Original file line number Diff line number Diff line change 22//!
33//! * Headers: <https://sourceware.org/git/?p=glibc.git> (official)
44//! * Headers: <https://github.com/bminor/glibc> (mirror)
5+ //!
6+ //! This module structure is modeled after glibc's source tree. Its build system selects headers
7+ //! from different locations based on the platform, which we mimic here with reexports.
8+
9+ /// Source directory: `posix/`
10+ ///
11+ /// <https://github.com/bminor/glibc/tree/master/posix>
12+ mod posix {
13+ pub ( crate ) mod unistd;
14+ }
15+
16+ /// Source directory: `sysdeps/`
17+ ///
18+ /// <https://github.com/bminor/glibc/tree/master/sysdeps>
19+ mod sysdeps {
20+ pub ( crate ) mod unix;
21+ }
522
6- pub ( crate ) mod unistd;
23+ pub ( crate ) use posix:: * ;
24+ #[ cfg( target_os = "linux" ) ]
25+ pub ( crate ) use sysdeps:: unix:: linux:: * ;
Original file line number Diff line number Diff line change 11//! Header: `unistd.h`
2+ //!
3+ //! <https://github.com/bminor/glibc/blob/master/posix/unistd.h>
24
35pub use crate :: new:: common:: posix:: unistd:: {
46 STDERR_FILENO ,
Original file line number Diff line number Diff line change 1+ //! Source directory: `sysdeps/unix/sysv/linux` (the `sysv` is flattened).
2+ //!
3+ //! <https://github.com/bminor/glibc/tree/master/sysdeps/unix/sysv/linux>
4+
5+ /// Directory: `net/`
6+ ///
7+ /// Source directory: `sysdeps/unix/sysv/linux/net`
8+ pub ( crate ) mod net {
9+ pub ( crate ) mod route;
10+ }
Original file line number Diff line number Diff line change 1+ //! Header: `net/route.h`
2+ //!
3+ //! Source header: `sysdeps/unix/sysv/linux/net/route.h`
4+ //! <https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/net/route.h>
5+
6+ use crate :: prelude:: * ;
7+
8+ s ! {
9+ pub struct rtentry {
10+ pub rt_pad1: c_ulong,
11+ pub rt_dst: crate :: sockaddr,
12+ pub rt_gateway: crate :: sockaddr,
13+ pub rt_genmask: crate :: sockaddr,
14+ pub rt_flags: c_ushort,
15+ pub rt_pad2: c_short,
16+ pub rt_pad3: c_ulong,
17+ pub rt_tos: c_uchar,
18+ pub rt_class: c_uchar,
19+ // FIXME(1.0): private padding fields
20+ #[ cfg( target_pointer_width = "64" ) ]
21+ pub rt_pad4: [ c_short; 3usize ] ,
22+ #[ cfg( not( target_pointer_width = "64" ) ) ]
23+ pub rt_pad4: c_short,
24+ pub rt_metric: c_short,
25+ pub rt_dev: * mut c_char,
26+ pub rt_mtu: c_ulong,
27+ pub rt_window: c_ulong,
28+ pub rt_irtt: c_ushort,
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ //! Source directory: `sysdeps/unix/`
2+ //!
3+ //! <https://github.com/bminor/glibc/tree/master/sysdeps/unix>
4+
5+ #[ cfg( target_os = "linux" ) ]
6+ pub ( crate ) mod linux;
Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ cfg_if! {
177177 pub use linux:: can:: raw:: * ;
178178 pub use linux:: can:: * ;
179179 pub use linux:: keyctl:: * ;
180+ #[ cfg( target_env = "gnu" ) ]
181+ pub use net:: route:: * ;
180182 } else if #[ cfg( target_vendor = "apple" ) ] {
181183 pub use signal:: * ;
182184 }
Original file line number Diff line number Diff line change @@ -153,27 +153,6 @@ s! {
153153 pub nm_gid: u32 ,
154154 }
155155
156- pub struct rtentry {
157- pub rt_pad1: c_ulong,
158- pub rt_dst: crate :: sockaddr,
159- pub rt_gateway: crate :: sockaddr,
160- pub rt_genmask: crate :: sockaddr,
161- pub rt_flags: c_ushort,
162- pub rt_pad2: c_short,
163- pub rt_pad3: c_ulong,
164- pub rt_tos: c_uchar,
165- pub rt_class: c_uchar,
166- #[ cfg( target_pointer_width = "64" ) ]
167- pub rt_pad4: [ c_short; 3usize ] ,
168- #[ cfg( not( target_pointer_width = "64" ) ) ]
169- pub rt_pad4: c_short,
170- pub rt_metric: c_short,
171- pub rt_dev: * mut c_char,
172- pub rt_mtu: c_ulong,
173- pub rt_window: c_ulong,
174- pub rt_irtt: c_ushort,
175- }
176-
177156 pub struct ntptimeval {
178157 pub time: crate :: timeval,
179158 pub maxerror: c_long,
You can’t perform that action at this time.
0 commit comments