Skip to content

Commit 2569606

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
The following error happens: In file included from vstate_exec_nolibc.c:2: /usr/include/riscv64-linux-gnu/sys/prctl.h:42:12: error: conflicting types for ‘prctl’; h ave ‘int(int, ...)’ 42 | extern int prctl (int __option, ...) __THROW; | ^~~~~ In file included from ./../../../../include/nolibc/nolibc.h:99, from <command-line>: ./../../../../include/nolibc/sys.h:892:5: note: previous definition of ‘prctl’ with type ‘int(int, long unsigned int, long unsigned int, long unsigned int, long unsigned int) ’ 892 | int prctl(int option, unsigned long arg2, unsigned long arg3, | ^~~~~ Fix this by not including <sys/prctl.h>, which is not needed here since prctl syscall is directly called using its number. Fixes: 7cf6198 ("selftests: Test RISC-V Vector prctl interface") Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20230713115829.110421-1-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 8c82d2b commit 2569606

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0-only
2-
#include <sys/prctl.h>
3-
42
#define THIS_PROGRAM "./vstate_exec_nolibc"
53

64
int main(int argc, char **argv)

0 commit comments

Comments
 (0)