97
97
pub tv_usec: suseconds_t,
98
98
}
99
99
100
- // linux x32 compatibility
101
- // See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
102
100
pub struct timespec {
103
101
pub tv_sec: time_t,
104
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
105
- pub tv_nsec: i64 ,
106
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
107
102
pub tv_nsec: :: c_long,
108
103
}
109
104
105
+ // FIXME: the rlimit and rusage related functions and types don't exist
106
+ // within zircon. Are there reasons for keeping them around?
110
107
pub struct rlimit {
111
108
pub rlim_cur: rlim_t,
112
109
pub rlim_max: rlim_t,
@@ -166,11 +163,14 @@ s! {
166
163
pub s_addr: in_addr_t,
167
164
}
168
165
169
- #[ cfg_attr( feature = "align" , repr( align( 4 ) ) ) ]
170
166
pub struct in6_addr {
171
- pub s6_addr: [ u8 ; 16 ] ,
172
- #[ cfg( not( feature = "align" ) ) ]
173
- __align: [ u32 ; 0 ] ,
167
+ pub __in6_union: in6_union,
168
+ }
169
+
170
+ pub union in6_union {
171
+ pub __s6_addr: [ u8 ; 16 ] ,
172
+ pub __s6_addr16: [ u16 ; 8 ] ,
173
+ pub __s6_addr32: [ u32 ; 4 ] ,
174
174
}
175
175
176
176
pub struct ip_mreq {
180
180
181
181
pub struct ipv6_mreq {
182
182
pub ipv6mr_multiaddr: in6_addr,
183
- #[ cfg( target_os = "android" ) ]
184
- pub ipv6mr_interface: :: c_int,
185
- #[ cfg( not( target_os = "android" ) ) ]
186
183
pub ipv6mr_interface: :: c_uint,
187
184
}
188
185
@@ -400,13 +397,9 @@ s! {
400
397
401
398
pub struct sched_param {
402
399
pub sched_priority: :: c_int,
403
- #[ cfg( target_env = "musl" ) ]
404
400
pub sched_ss_low_priority: :: c_int,
405
- #[ cfg( target_env = "musl" ) ]
406
401
pub sched_ss_repl_period: :: timespec,
407
- #[ cfg( target_env = "musl" ) ]
408
402
pub sched_ss_init_budget: :: timespec,
409
- #[ cfg( target_env = "musl" ) ]
410
403
pub sched_ss_max_repl: :: c_int,
411
404
}
412
405
@@ -417,11 +410,6 @@ s! {
417
410
pub dli_saddr: * mut :: c_void,
418
411
}
419
412
420
- #[ cfg_attr( any( all( target_arch = "x86" ,
421
- not( target_env = "musl" ) ,
422
- not( target_os = "android" ) ) ,
423
- target_arch = "x86_64" ) ,
424
- repr( packed) ) ]
425
413
pub struct epoll_event {
426
414
pub events: :: uint32_t,
427
415
pub u64 : :: uint64_t,
@@ -467,13 +455,9 @@ s! {
467
455
pub sigev_value: :: sigval,
468
456
pub sigev_signo: :: c_int,
469
457
pub sigev_notify: :: c_int,
470
- // Actually a union. We only expose sigev_notify_thread_id because it's
471
- // the most useful member
472
- pub sigev_notify_thread_id: :: c_int,
473
- #[ cfg( target_pointer_width = "64" ) ]
474
- __unused1: [ :: c_int; 11 ] ,
475
- #[ cfg( target_pointer_width = "32" ) ]
476
- __unused1: [ :: c_int; 12 ]
458
+ pub sigev_notify_function: fn ( :: sigval) ,
459
+ pub sigev_notify_attributes: * mut pthread_attr_t,
460
+ pub __pad: [ :: c_char; 56 - 3 * 8 /* 8 == sizeof(long) */ ] ,
477
461
}
478
462
479
463
pub struct dirent {
@@ -522,30 +506,22 @@ s! {
522
506
523
507
#[ cfg_attr( all( feature = "align" ,
524
508
target_pointer_width = "32" ,
525
- any( target_arch = "mips" ,
526
- target_arch = "arm" ,
527
- target_arch = "powerpc" ,
509
+ any( target_arch = "arm" ,
528
510
target_arch = "x86_64" ) ) ,
529
511
repr( align( 4 ) ) ) ]
530
512
#[ cfg_attr( all( feature = "align" ,
531
513
any( target_pointer_width = "64" ,
532
- not( any( target_arch = "mips" ,
533
- target_arch = "arm" ,
534
- target_arch = "powerpc" ,
514
+ not( any( target_arch = "arm" ,
535
515
target_arch = "x86_64" ) ) ) ) ,
536
516
repr( align( 8 ) ) ) ]
537
517
pub struct pthread_mutex_t {
538
518
#[ cfg( all( not( feature = "align" ) ,
539
- any( target_arch = "mips" ,
540
- target_arch = "arm" ,
541
- target_arch = "powerpc" ,
519
+ any( target_arch = "arm" ,
542
520
all( target_arch = "x86_64" ,
543
521
target_pointer_width = "32" ) ) ) ) ]
544
522
__align: [ :: c_long; 0 ] ,
545
523
#[ cfg( not( any( feature = "align" ,
546
- target_arch = "mips" ,
547
524
target_arch = "arm" ,
548
- target_arch = "powerpc" ,
549
525
all( target_arch = "x86_64" ,
550
526
target_pointer_width = "32" ) ) ) ) ]
551
527
__align: [ :: c_longlong; 0 ] ,
@@ -554,30 +530,22 @@ s! {
554
530
555
531
#[ cfg_attr( all( feature = "align" ,
556
532
target_pointer_width = "32" ,
557
- any( target_arch = "mips" ,
558
- target_arch = "arm" ,
559
- target_arch = "powerpc" ,
533
+ any( target_arch = "arm" ,
560
534
target_arch = "x86_64" ) ) ,
561
535
repr( align( 4 ) ) ) ]
562
536
#[ cfg_attr( all( feature = "align" ,
563
537
any( target_pointer_width = "64" ,
564
- not( any( target_arch = "mips" ,
565
- target_arch = "arm" ,
566
- target_arch = "powerpc" ,
538
+ not( any( target_arch = "arm" ,
567
539
target_arch = "x86_64" ) ) ) ) ,
568
540
repr( align( 8 ) ) ) ]
569
541
pub struct pthread_rwlock_t {
570
542
#[ cfg( all( not( feature = "align" ) ,
571
- any( target_arch = "mips" ,
572
- target_arch = "arm" ,
573
- target_arch = "powerpc" ,
543
+ any( target_arch = "arm" ,
574
544
all( target_arch = "x86_64" ,
575
545
target_pointer_width = "32" ) ) ) ) ]
576
546
__align: [ :: c_long; 0 ] ,
577
547
#[ cfg( not( any( feature = "align" ,
578
- target_arch = "mips" ,
579
548
target_arch = "arm" ,
580
- target_arch = "powerpc" ,
581
549
all( target_arch = "x86_64" ,
582
550
target_pointer_width = "32" ) ) ) ) ]
583
551
__align: [ :: c_longlong; 0 ] ,
@@ -586,29 +554,21 @@ s! {
586
554
587
555
#[ cfg_attr( all( feature = "align" ,
588
556
any( target_pointer_width = "32" ,
589
- target_arch = "x86_64" , target_arch = "powerpc64" ,
590
- target_arch = "mips64" , target_arch = "s390x" ,
591
- target_arch = "sparc64" ,
557
+ target_arch = "x86_64" ,
592
558
all( target_arch = "aarch64" , target_env = "musl" ) ) ) ,
593
559
repr( align( 4 ) ) ) ]
594
560
#[ cfg_attr( all( feature = "align" ,
595
561
not( any( target_pointer_width = "32" ,
596
- target_arch = "x86_64" , target_arch = "powerpc64" ,
597
- target_arch = "mips64" , target_arch = "s390x" ,
598
- target_arch = "sparc64" ,
562
+ target_arch = "x86_64" ,
599
563
all( target_arch = "aarch64" , target_env = "musl" ) ) ) ) ,
600
564
repr( align( 8 ) ) ) ]
601
565
pub struct pthread_mutexattr_t {
602
566
#[ cfg( all( not( features = "align" ) ,
603
- any( target_arch = "x86_64" , target_arch = "powerpc64" ,
604
- target_arch = "mips64" , target_arch = "s390x" ,
605
- target_arch = "sparc64" ,
567
+ any( target_arch = "x86_64" ,
606
568
all( target_arch = "aarch64" , target_env = "musl" ) ) ) ) ]
607
569
__align: [ :: c_int; 0 ] ,
608
570
#[ cfg( all( not( features = "align" ) ,
609
- not( any( target_arch = "x86_64" , target_arch = "powerpc64" ,
610
- target_arch = "mips64" , target_arch = "s390x" ,
611
- target_arch = "sparc64" ,
571
+ not( any( target_arch = "x86_64" ,
612
572
all( target_arch = "aarch64" , target_env = "musl" ) ) ) ) ) ]
613
573
__align: [ :: c_long; 0 ] ,
614
574
size: [ u8 ; __SIZEOF_PTHREAD_MUTEXATTR_T] ,
@@ -3987,9 +3947,6 @@ cfg_if! {
3987
3947
if #[ cfg( target_arch = "aarch64" ) ] {
3988
3948
mod aarch64;
3989
3949
pub use self :: aarch64:: * ;
3990
- } else if #[ cfg( any( target_arch = "powerpc64" ) ) ] {
3991
- mod powerpc64;
3992
- pub use self :: powerpc64:: * ;
3993
3950
} else if #[ cfg( any( target_arch = "x86_64" ) ) ] {
3994
3951
mod x86_64;
3995
3952
pub use self :: x86_64:: * ;
0 commit comments