* [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
@ 2023-07-13 11:58 Alexandre Ghiti
2023-08-03 14:45 ` Palmer Dabbelt
2023-08-03 15:10 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Ghiti @ 2023-07-13 11:58 UTC (permalink / raw)
To: Shuah Khan, Paul Walmsley, Palmer Dabbelt, Albert Ou, Andy Chiu,
linux-kselftest, linux-riscv, linux-kernel
Cc: Alexandre Ghiti
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(-)
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)
--
2.39.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
2023-07-13 11:58 [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c Alexandre Ghiti
@ 2023-08-03 14:45 ` Palmer Dabbelt
2023-08-03 15:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2023-08-03 14:45 UTC (permalink / raw)
To: Shuah Khan, Paul Walmsley, Palmer Dabbelt, Albert Ou, Andy Chiu,
linux-kselftest, linux-riscv, linux-kernel, Alexandre Ghiti
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,
--
Palmer Dabbelt <palmer@rivosinc.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
2023-07-13 11:58 [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c Alexandre Ghiti
2023-08-03 14:45 ` Palmer Dabbelt
@ 2023-08-03 15:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-08-03 15:10 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: linux-riscv, shuah, paul.walmsley, palmer, aou, andy.chiu,
linux-kselftest, linux-kernel
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-03 15:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 11:58 [PATCH] selftests: riscv: Fix compilation error with vstate_exec_nolibc.c Alexandre Ghiti
2023-08-03 14:45 ` Palmer Dabbelt
2023-08-03 15:10 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox