@@ -12,13 +12,16 @@ pub type ino_t = ::c_ulong;
1212pub type nlink_t = :: c_uint ;
1313pub type off_t = :: c_long ;
1414pub type rlim_t = c_ulong ;
15- pub type rlim64_t = u64 ;
1615// [uClibc docs] Note stat64 has the same shape as stat for x86-64.
1716pub type stat64 = stat ;
1817pub type suseconds_t = :: c_long ;
1918pub type time_t = :: c_int ;
2019pub type wchar_t = :: c_int ;
2120
21+ pub type fsblkcnt64_t = u64 ;
22+ pub type fsfilcnt64_t = u64 ;
23+ pub type __u64 = :: c_ulong ;
24+
2225s ! {
2326 pub struct ipc_perm {
2427 pub __key: :: key_t,
@@ -167,6 +170,37 @@ s! {
167170 f_spare: [ fsword_t; 5 ] ,
168171 }
169172
173+ pub struct statfs64 {
174+ pub f_type: :: c_int,
175+ pub f_bsize: :: c_int,
176+ pub f_blocks: :: fsblkcnt64_t,
177+ pub f_bfree: :: fsblkcnt64_t,
178+ pub f_bavail: :: fsblkcnt64_t,
179+ pub f_files: :: fsfilcnt64_t,
180+ pub f_ffree: :: fsfilcnt64_t,
181+ pub f_fsid: :: fsid_t,
182+ pub f_namelen: :: c_int,
183+ pub f_frsize: :: c_int,
184+ pub f_flags: :: c_int,
185+ pub f_spare: [ :: c_int; 4 ] ,
186+ }
187+
188+ pub struct statvfs64 {
189+ pub f_bsize: :: c_ulong,
190+ pub f_frsize: :: c_ulong,
191+ pub f_blocks: u64 ,
192+ pub f_bfree: u64 ,
193+ pub f_bavail: u64 ,
194+ pub f_files: u64 ,
195+ pub f_ffree: u64 ,
196+ pub f_favail: u64 ,
197+ pub f_fsid: :: c_ulong,
198+ __f_unused: :: c_int,
199+ pub f_flag: :: c_ulong,
200+ pub f_namemax: :: c_ulong,
201+ __f_spare: [ :: c_int; 6 ] ,
202+ }
203+
170204 pub struct msghdr { // FIXME
171205 pub msg_name: * mut :: c_void,
172206 pub msg_namelen: :: socklen_t,
@@ -229,6 +263,21 @@ s! {
229263 pub struct fsid_t { // FIXME
230264 __val: [ :: c_int; 2 ] ,
231265 }
266+
267+ // FIXME this is actually a union
268+ pub struct sem_t {
269+ #[ cfg( target_pointer_width = "32" ) ]
270+ __size: [ :: c_char; 16 ] ,
271+ #[ cfg( target_pointer_width = "64" ) ]
272+ __size: [ :: c_char; 32 ] ,
273+ __align: [ :: c_long; 0 ] ,
274+ }
275+
276+ pub struct cmsghdr {
277+ pub cmsg_len: :: size_t,
278+ pub cmsg_level: :: c_int,
279+ pub cmsg_type: :: c_int,
280+ }
232281}
233282
234283s_no_extra_traits ! {
@@ -252,6 +301,8 @@ pub const EDEADLK: ::c_int = 35; // Resource deadlock would occur
252301pub const ENOSYS : :: c_int = 38 ; // Function not implemented
253302pub const ENOTCONN : :: c_int = 107 ; // Transport endpoint is not connected
254303pub const ETIMEDOUT : :: c_int = 110 ; // connection timed out
304+ pub const EOPNOTSUPP : :: c_int = 0x5f ;
305+ pub const ENODATA : :: c_int = 0x3d ;
255306pub const O_APPEND : :: c_int = 02000 ;
256307pub const O_ACCMODE : :: c_int = 0003 ;
257308pub const O_CLOEXEC : :: c_int = 0x80000 ;
@@ -272,10 +323,12 @@ pub const SOL_SOCKET: ::c_int = 1;
272323pub const SO_RCVTIMEO : :: c_int = 20 ;
273324pub const SO_REUSEADDR : :: c_int = 2 ;
274325pub const SO_SNDTIMEO : :: c_int = 21 ;
326+ pub const SO_TIMESTAMP : :: c_int = 0x1d ;
275327pub const RLIM_INFINITY : u64 = 0xffffffffffffffff ;
276328pub const __SIZEOF_PTHREAD_COND_T: usize = 48 ;
277329pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4 ;
278330pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56 ;
331+ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8 ;
279332
280333cfg_if ! {
281334 if #[ cfg( target_os = "l4re" ) ] {
@@ -286,14 +339,3 @@ cfg_if! {
286339 pub use other:: * ;
287340 }
288341}
289-
290- cfg_if ! {
291- if #[ cfg( libc_align) ] {
292- #[ macro_use]
293- mod align;
294- } else {
295- #[ macro_use]
296- mod no_align;
297- }
298- }
299- expand_align ! ( ) ;
0 commit comments