@@ -12,13 +12,16 @@ pub type ino_t = ::c_ulong;
12
12
pub type nlink_t = :: c_uint ;
13
13
pub type off_t = :: c_long ;
14
14
pub type rlim_t = c_ulong ;
15
- pub type rlim64_t = u64 ;
16
15
// [uClibc docs] Note stat64 has the same shape as stat for x86-64.
17
16
pub type stat64 = stat ;
18
17
pub type suseconds_t = :: c_long ;
19
18
pub type time_t = :: c_int ;
20
19
pub type wchar_t = :: c_int ;
21
20
21
+ pub type fsblkcnt64_t = u64 ;
22
+ pub type fsfilcnt64_t = u64 ;
23
+ pub type __u64 = :: c_ulong ;
24
+
22
25
s ! {
23
26
pub struct ipc_perm {
24
27
pub __key: :: key_t,
@@ -167,6 +170,37 @@ s! {
167
170
f_spare: [ fsword_t; 5 ] ,
168
171
}
169
172
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
+
170
204
pub struct msghdr { // FIXME
171
205
pub msg_name: * mut :: c_void,
172
206
pub msg_namelen: :: socklen_t,
@@ -229,6 +263,21 @@ s! {
229
263
pub struct fsid_t { // FIXME
230
264
__val: [ :: c_int; 2 ] ,
231
265
}
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
+ }
232
281
}
233
282
234
283
s_no_extra_traits ! {
@@ -252,6 +301,8 @@ pub const EDEADLK: ::c_int = 35; // Resource deadlock would occur
252
301
pub const ENOSYS : :: c_int = 38 ; // Function not implemented
253
302
pub const ENOTCONN : :: c_int = 107 ; // Transport endpoint is not connected
254
303
pub const ETIMEDOUT : :: c_int = 110 ; // connection timed out
304
+ pub const EOPNOTSUPP : :: c_int = 0x5f ;
305
+ pub const ENODATA : :: c_int = 0x3d ;
255
306
pub const O_APPEND : :: c_int = 02000 ;
256
307
pub const O_ACCMODE : :: c_int = 0003 ;
257
308
pub const O_CLOEXEC : :: c_int = 0x80000 ;
@@ -272,10 +323,12 @@ pub const SOL_SOCKET: ::c_int = 1;
272
323
pub const SO_RCVTIMEO : :: c_int = 20 ;
273
324
pub const SO_REUSEADDR : :: c_int = 2 ;
274
325
pub const SO_SNDTIMEO : :: c_int = 21 ;
326
+ pub const SO_TIMESTAMP : :: c_int = 0x1d ;
275
327
pub const RLIM_INFINITY : u64 = 0xffffffffffffffff ;
276
328
pub const __SIZEOF_PTHREAD_COND_T: usize = 48 ;
277
329
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4 ;
278
330
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56 ;
331
+ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8 ;
279
332
280
333
cfg_if ! {
281
334
if #[ cfg( target_os = "l4re" ) ] {
@@ -286,14 +339,3 @@ cfg_if! {
286
339
pub use other:: * ;
287
340
}
288
341
}
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