|
39 | 39 | //! require dependencies that don't build there, so tests need newer Rust version (they are run on
|
40 | 40 | //! stable).
|
41 | 41 | //!
|
| 42 | +//! Note that this ancient version of rustc no longer compiles current versions of `libc`. If you |
| 43 | +//! want to use rustc this old, you need to force your dependency resolution to pick old enough |
| 44 | +//! version of `libc` (`0.2.156` was found to work, but newer ones may too). |
| 45 | +//! |
42 | 46 | //! # Portability
|
43 | 47 | //!
|
44 | 48 | //! This crate includes a limited support for Windows, based on `signal`/`raise` in the CRT.
|
@@ -158,7 +162,23 @@ impl Slot {
|
158 | 162 | fn new(signal: libc::c_int) -> Result<Self, Error> {
|
159 | 163 | // C data structure, expected to be zeroed out.
|
160 | 164 | let mut new: libc::sigaction = unsafe { mem::zeroed() };
|
161 |
| - new.sa_sigaction = handler as usize; |
| 165 | + |
| 166 | + // Note: AIX fixed their naming in libc 0.2.171. |
| 167 | + // |
| 168 | + // However, if we mandate that _for everyone_, other systems fail to compile on old Rust |
| 169 | + // versions (eg. 1.26.0), because they are no longer able to compile this new libc. |
| 170 | + // |
| 171 | + // There doesn't seem to be a way to make Cargo force the dependency for only one target |
| 172 | + // (it doesn't compile the ones it doesn't need, but it stills considers the other targets |
| 173 | + // for version resolution). |
| 174 | + // |
| 175 | + // Therefore, we let the user have freedom - if they want AIX, they can upgrade to new |
| 176 | + // enough libc. If they want ancient rustc, they can force older versions of libc. |
| 177 | + // |
| 178 | + // See #169. |
| 179 | + |
| 180 | + new.sa_sigaction = handler as usize; // If it doesn't compile on AIX, upgrade the libc dependency |
| 181 | + |
162 | 182 | // Android is broken and uses different int types than the rest (and different depending on
|
163 | 183 | // the pointer width). This converts the flags to the proper type no matter what it is on
|
164 | 184 | // the given platform.
|
|
0 commit comments