Message ID | 20230713115829.110421-1-alexghiti@rivosinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 25696067202f047e22c1562f1f56b0e2eb547d1a |
Headers | show |
Series | selftests: riscv: Fix compilation error with vstate_exec_nolibc.c | expand |
Context | Check | Description |
---|---|---|
conchuod/cover_letter | success | Single patches do not need cover letters |
conchuod/tree_selection | success | Guessed tree name to be fixes at HEAD b690e266dae2 |
conchuod/fixes_present | success | Fixes tag present in non-next series |
conchuod/maintainers_pattern | success | MAINTAINERS pattern errors before the patch: 4 and now 4 |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/build_rv64_clang_allmodconfig | success | Errors and warnings before: 9 this patch: 9 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_rv64_gcc_allmodconfig | success | Errors and warnings before: 9 this patch: 9 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 3 this patch: 3 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 6 lines checked |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | Fixes tag looks correct |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
On Thu, 13 Jul 2023 13:58:29 +0200, Alexandre Ghiti wrote: > 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, > | ^~~~~ > > [...] Applied, thanks! [1/1] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c https://git.kernel.org/palmer/c/25696067202f Best regards,
Hello: This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <palmer@rivosinc.com>: On Thu, 13 Jul 2023 13:58:29 +0200 you wrote: > 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, > | ^~~~~ > > [...] Here is the summary with links: - selftests: riscv: Fix compilation error with vstate_exec_nolibc.c https://git.kernel.org/riscv/c/25696067202f You are awesome, thank you!
diff --git a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c index 5cbc392944a6..2c0d2b1126c1 100644 --- a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c +++ b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c @@ -1,6 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-only -#include <sys/prctl.h> - #define THIS_PROGRAM "./vstate_exec_nolibc" int main(int argc, char **argv)
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: 7cf6198ce22d ("selftests: Test RISC-V Vector prctl interface") Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> --- tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c | 2 -- 1 file changed, 2 deletions(-)