bolts: haiku build fix. (#2335)
This commit is contained in:
parent
b2635df524
commit
6db68970ee
@ -506,7 +506,7 @@ pub unsafe fn setup_signal_handler<T: 'static + Handler>(handler: *mut T) -> Res
|
||||
#[inline(always)]
|
||||
pub fn ucontext() -> Result<ucontext_t, Error> {
|
||||
let mut ucontext = unsafe { mem::zeroed() };
|
||||
if cfg!(not(target_os = "openbsd")) {
|
||||
if cfg!(not(any(target_os = "openbsd", target_os = "haiku"))) {
|
||||
if unsafe { getcontext(&mut ucontext) } == 0 {
|
||||
Ok(ucontext)
|
||||
} else {
|
||||
|
@ -285,22 +285,24 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
#[cfg(not(target_os = "haiku"))]
|
||||
use serial_test::serial;
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
#[cfg(not(target_os = "haiku"))]
|
||||
fn test_state_restore() {
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
|
||||
use serial_test::serial;
|
||||
|
||||
use crate::{
|
||||
shmem::{ShMemProvider, StdShMemProvider},
|
||||
staterestore::StateRestorer,
|
||||
};
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn test_state_restore() {
|
||||
const TESTMAP_SIZE: usize = 1024;
|
||||
|
||||
let mut shmem_provider = StdShMemProvider::new().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user