Skip to content

Commit d6fd436

Browse files
committed
fix as_lib
1 parent b688436 commit d6fd436

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libafl/exit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "libafl/defs.h"
88
#include "libafl/cpu.h"
99

10-
#ifndef CONFIG_USER_ONLY
10+
#if !defined(CONFIG_USER_ONLY) && defined(AS_LIB)
1111
#include "system/runstate.h"
1212
#endif
1313

@@ -79,7 +79,7 @@ static void prepare_qemu_exit(CPUState* cpu, target_ulong next_pc)
7979
last_exit_reason.cpu = cpu;
8080
last_exit_reason.next_pc = next_pc;
8181

82-
#ifndef CONFIG_USER_ONLY
82+
#if !defined(CONFIG_USER_ONLY) && defined(AS_LIB)
8383
qemu_system_return_request();
8484
#endif
8585

@@ -146,7 +146,9 @@ void libafl_exit_request_timeout(void)
146146
last_exit_reason.kind = TIMEOUT;
147147
last_exit_reason.cpu = current_cpu;
148148

149+
#ifdef AS_LIB
149150
qemu_system_return_request();
151+
#endif
150152
}
151153
#endif
152154

0 commit comments

Comments
 (0)