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)]
|
#[inline(always)]
|
||||||
pub fn ucontext() -> Result<ucontext_t, Error> {
|
pub fn ucontext() -> Result<ucontext_t, Error> {
|
||||||
let mut ucontext = unsafe { mem::zeroed() };
|
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 {
|
if unsafe { getcontext(&mut ucontext) } == 0 {
|
||||||
Ok(ucontext)
|
Ok(ucontext)
|
||||||
} else {
|
} else {
|
||||||
|
@ -285,22 +285,24 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
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::{
|
use alloc::{
|
||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
|
|
||||||
use serial_test::serial;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
shmem::{ShMemProvider, StdShMemProvider},
|
shmem::{ShMemProvider, StdShMemProvider},
|
||||||
staterestore::StateRestorer,
|
staterestore::StateRestorer,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[serial]
|
|
||||||
#[cfg_attr(miri, ignore)]
|
|
||||||
fn test_state_restore() {
|
|
||||||
const TESTMAP_SIZE: usize = 1024;
|
const TESTMAP_SIZE: usize = 1024;
|
||||||
|
|
||||||
let mut shmem_provider = StdShMemProvider::new().unwrap();
|
let mut shmem_provider = StdShMemProvider::new().unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user