|
72 | 72 | __unused5: *mut ::c_void,
|
73 | 73 | }
|
74 | 74 |
|
| 75 | + #[cfg_attr(feature = "align", repr(align(8)))] |
75 | 76 | pub struct pthread_mutex_t {
|
| 77 | + #[cfg(not(feature = "align"))] |
76 | 78 | __align: [::c_long; 0],
|
77 | 79 | size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
78 | 80 | }
|
79 | 81 |
|
| 82 | + #[cfg_attr(feature = "align", repr(align(8)))] |
80 | 83 | pub struct pthread_rwlock_t {
|
| 84 | + #[cfg(not(feature = "align"))] |
81 | 85 | __align: [::c_long; 0],
|
82 | 86 | size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
83 | 87 | }
|
84 | 88 |
|
| 89 | + #[cfg_attr(feature = "align", repr(align(4)))] |
85 | 90 | pub struct pthread_mutexattr_t {
|
| 91 | + #[cfg(not(feature = "align"))] |
86 | 92 | __align: [::c_int; 0],
|
87 | 93 | size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
88 | 94 | }
|
89 | 95 |
|
| 96 | + #[cfg_attr(feature = "align", repr(align(4)))] |
90 | 97 | pub struct pthread_rwlockattr_t {
|
| 98 | + #[cfg(not(feature = "align"))] |
91 | 99 | __align: [::c_int; 0],
|
92 | 100 | size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
|
93 | 101 | }
|
94 | 102 |
|
| 103 | + #[cfg_attr(all(feature = "align", target_pointer_width = "32"), repr(align(4)))] |
| 104 | + #[cfg_attr(all(feature = "align", target_pointer_width = "64"), repr(align(8)))] |
95 | 105 | pub struct pthread_cond_t {
|
| 106 | + #[cfg(not(feature = "align"))] |
96 | 107 | __align: [*const ::c_void; 0],
|
97 | 108 | size: [u8; __SIZEOF_PTHREAD_COND_T],
|
98 | 109 | }
|
99 | 110 |
|
| 111 | + #[cfg_attr(feature = "align", repr(align(4)))] |
100 | 112 | pub struct pthread_condattr_t {
|
| 113 | + #[cfg(not(feature = "align"))] |
101 | 114 | __align: [::c_int; 0],
|
102 | 115 | size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
103 | 116 | }
|
@@ -748,14 +761,17 @@ pub const RTLD_NOW: ::c_int = 0x2;
|
748 | 761 | pub const TCP_MD5SIG: ::c_int = 14;
|
749 | 762 |
|
750 | 763 | pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
| 764 | + #[cfg(not(feature = "align"))] |
751 | 765 | __align: [],
|
752 | 766 | size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
753 | 767 | };
|
754 | 768 | pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
| 769 | + #[cfg(not(feature = "align"))] |
755 | 770 | __align: [],
|
756 | 771 | size: [0; __SIZEOF_PTHREAD_COND_T],
|
757 | 772 | };
|
758 | 773 | pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
| 774 | + #[cfg(not(feature = "align"))] |
759 | 775 | __align: [],
|
760 | 776 | size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
761 | 777 | };
|
|
0 commit comments