From b930d86e13440391c0456f6598b00fab088fad8e Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Tue, 9 Feb 2021 09:48:50 +0100 Subject: [PATCH] no_std fixes --- afl/src/events/mod.rs | 7 +++++-- afl/src/events/stats.rs | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/afl/src/events/mod.rs b/afl/src/events/mod.rs index fcd5a909cf..9eaa4a1757 100644 --- a/afl/src/events/mod.rs +++ b/afl/src/events/mod.rs @@ -11,10 +11,12 @@ use alloc::{ }; use core::{fmt, marker::PhantomData, time::Duration}; use serde::{Deserialize, Serialize}; -use std::env; #[cfg(feature = "std")] -use std::process::Command; +use std::{ + process::Command, + env, +}; #[cfg(feature = "std")] #[cfg(unix)] @@ -846,6 +848,7 @@ where /// A restarting state is a combination of restarter and runner, that can be used on systems without `fork`. /// The restarter will start a new process each time the child crashes or timeouts. +#[cfg(feature = "std")] pub fn setup_restarting_state( mgr: &mut LlmpEventManager, ) -> Result>, AflError> diff --git a/afl/src/events/stats.rs b/afl/src/events/stats.rs index c270863f22..e6697c3417 100644 --- a/afl/src/events/stats.rs +++ b/afl/src/events/stats.rs @@ -1,4 +1,5 @@ use core::{time, time::Duration}; +use alloc::{string::String, vec::Vec}; use crate::utils::current_time;