Skip to content

Commit 6db6897

Browse files
authored
bolts: haiku build fix. (#2335)
1 parent b2635df commit 6db6897

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

libafl_bolts/src/os/unix_signals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ pub unsafe fn setup_signal_handler<T: 'static + Handler>(handler: *mut T) -> Res
506506
#[inline(always)]
507507
pub fn ucontext() -> Result<ucontext_t, Error> {
508508
let mut ucontext = unsafe { mem::zeroed() };
509-
if cfg!(not(target_os = "openbsd")) {
509+
if cfg!(not(any(target_os = "openbsd", target_os = "haiku"))) {
510510
if unsafe { getcontext(&mut ucontext) } == 0 {
511511
Ok(ucontext)
512512
} else {

libafl_bolts/src/staterestore.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,22 +285,24 @@ where
285285
#[cfg(test)]
286286
mod tests {
287287

288-
use alloc::{
289-
string::{String, ToString},
290-
vec::Vec,
291-
};
292-
288+
#[cfg(not(target_os = "haiku"))]
293289
use serial_test::serial;
294290

295-
use crate::{
296-
shmem::{ShMemProvider, StdShMemProvider},
297-
staterestore::StateRestorer,
298-
};
299-
300291
#[test]
301292
#[serial]
302293
#[cfg_attr(miri, ignore)]
294+
#[cfg(not(target_os = "haiku"))]
303295
fn test_state_restore() {
296+
use alloc::{
297+
string::{String, ToString},
298+
vec::Vec,
299+
};
300+
301+
use crate::{
302+
shmem::{ShMemProvider, StdShMemProvider},
303+
staterestore::StateRestorer,
304+
};
305+
304306
const TESTMAP_SIZE: usize = 1024;
305307

306308
let mut shmem_provider = StdShMemProvider::new().unwrap();

0 commit comments

Comments
 (0)