From 1c79f042592122d05790d682cbd59c49eb274973 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Thu, 26 May 2022 18:04:40 -0700 Subject: executor: include sched.h for syz_clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit syzkaller reports the following error when it tries to create a C reproducer: : In function ‘syz_clone’: :289:48: error: ‘CLONE_VM’ undeclared (first use in this function) :289:48: note: each undeclared identifier is reported only once for each function it appears in compiler invocation: gcc [-o /tmp/syz-executor3459695007 -DGOOS_linux=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -static-pie -fpermissive -w] --- executor/common_linux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index aef053953..b30366a87 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -5271,6 +5271,8 @@ static long handle_clone_ret(long ret) #endif #if SYZ_EXECUTOR || __NR_syz_clone +#include + // syz_clone is mostly needed on kernels which do not suport clone3. static long syz_clone(volatile long flags, volatile long stack, volatile long stack_len, volatile long ptid, volatile long ctid, volatile long tls) -- cgit mrf-deployment