linux-user: Fix build if headers don't define _LINUX_CAPABILITY_VERSION_1
PATCH 1/1 linux-user: Fix build if headers don't define _LINUX_CAPABILITY_VERSION_1
Older kernel headers don't define _LINUX_CAPABILITY_VERSION_1. Switch to using the older _LINUX_CAPABILITY_VERSION; newer headers still define this for source compatibility.
--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/syscall.c +1 -1
@@ -7698,7 +7698,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, header.version =tswap32 (target_header->version); header.pid =tswap32 (target_header->pid); -if (header.version != _LINUX_CAPABILITY_VERSION_1) { +if (header.version != _LINUX_CAPABILITY_VERSION) {/* Version 2 and up takes pointer to two user_data structs */ data_items =2 ; }
Signature · 1 line
1.9.0
Quoted 6 lines · Peter Maydell
Older kernel headers don't define
_LINUX_CAPABILITY_VERSION_1. Switch to using the older_LINUX_CAPABILITY_VERSION; newer headers still define this for source compatibility.Signed-off-by Peter Maydell <[email protected]>Reported-by Laurent Desnogues <[email protected]>
I'm not sure I should send "Reviewed-by" for issues I reported, but here it is.
Thanks,
Laurent
Quoted 20 lines
--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/syscall.c +1
-2@@ -7698,7 +7698,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, header.version =tswap32 (target_header->version); header.pid =tswap32 (target_header->pid); -if (header.version != _LINUX_CAPABILITY_VERSION_1) { +if (header.version != _LINUX_CAPABILITY_VERSION) {/* Version 2 and up takes pointer to two user_data structs */ data_items =2 ; } --1.9.0
Quoted 5 lines · Laurent Desnogues
Quoted 4 lines · Peter Maydell
Older kernel headers don't define
_LINUX_CAPABILITY_VERSION_1. Switch to using the older_LINUX_CAPABILITY_VERSION; newer headers still define this for source compatibility.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Peter Maydell <[email protected]>Reported-by Laurent Desnogues <[email protected]>I'm not sure I should send "Reviewed-by" for issues I reported, but here it is.
Reviewed-by Laurent Desnogues <[email protected]>
Well, a confirmation that it actually fixes the problem it purports to fix is always nice :-)
thanks
-- PMM
Quoted 6 lines · Peter Maydell
Older kernel headers don't define
_LINUX_CAPABILITY_VERSION_1. Switch to using the older_LINUX_CAPABILITY_VERSION; newer headers still define this for source compatibility.Signed-off-by Peter Maydell <[email protected]>Reported-by Laurent Desnogues <[email protected]>
Riku acked this via IRC, so applied to master as a buildfix.
thanks
-- PMM