unix_sigpipe: Skip some tests on android; libc has no signal function

If we don't skip these tests, they will fail in CI when `python3 ../x.py
--stage 2 test --host= --target arm-linux-androideabi` runs. The failure
is:

    auxiliary/libsigpipe_utils.so: error: undefined reference to 'signal'
This commit is contained in:
Martin Nordholts 2022-08-29 20:39:23 +02:00
parent ddee45e1d7
commit 6eae169ca2

View File

@ -10,7 +10,12 @@ pub enum SignalHandler {
/// Helper to assert that [`libc::SIGPIPE`] has the expected signal handler.
pub fn assert_sigpipe_handler(expected_handler: SignalHandler) {
#[cfg(unix)]
#[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "horizon")))]
#[cfg(not(any(
target_os = "emscripten",
target_os = "fuchsia",
target_os = "horizon",
target_os = "android",
)))]
{
let prev = unsafe { libc::signal(libc::SIGPIPE, libc::SIG_IGN) };