diff options
| author | Andrei Vagin <avagin@gmail.com> | 2022-05-26 18:04:40 -0700 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-05-27 19:29:29 +0200 |
| commit | 1c79f042592122d05790d682cbd59c49eb274973 (patch) | |
| tree | 662d39d2e518b4e423e731bfd963054d8d8b2cac /executor/common_linux.h | |
| parent | 91c583067cd169dd9d245b9440be128f1dbf0474 (diff) | |
executor: include sched.h for syz_clone
syzkaller reports the following error when it tries to create a C reproducer:
<stdin>: In function ‘syz_clone’:
<stdin>:289:48: error: ‘CLONE_VM’ undeclared (first use in this
function)
<stdin>: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]
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <sched.h> + // 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) |
