[PATCH v4] selftests/powerpc: Fix pkey syscall redefinitions

Sachin Sant sachinp at linux.vnet.ibm.com
Wed Aug 5 14:56:11 AEST 2020



> On 04-Aug-2020, at 11:01 PM, Sandipan Das <sandipan at linux.ibm.com> wrote:
> 
> On distros using older glibc versions, the pkey tests
> encounter build failures due to redefinition of the
> pkey syscall numbers.
> 
> For compatibility, commit 743f3544fffb added a wrapper
> for the gettid() syscall and included syscall.h if the
> version of glibc used is older than 2.30. This leads
> to different definitions of SYS_pkey_* as the ones in
> the pkey test header set numeric constants where as the
> ones from syscall.h reuse __NR_pkey_*. The compiler
> complains about redefinitions since they are different.
> 
> This replaces SYS_pkey_* definitions with __NR_pkey_*
> such that the definitions in both syscall.h and pkeys.h
> are alike. This way, if syscall.h has to be included
> for compatibility reasons, builds will still succeed.
> 
> Fixes: 743f3544fffb ("selftests/powerpc: Add wrapper for gettid")
> Reported-by: Sachin Sant <sachinp at linux.vnet.ibm.com>
> Suggested-by: David Laight <david.laight at aculab.com>
> Suggested-by: Michael Ellerman <mpe at ellerman.id.au>
> Signed-off-by: Sandipan Das <sandipan at linux.ibm.com>

Tested-by: Sachin Sant <sachinp at linux.vnet.ibm.com>

Thanks
-Sachin


More information about the Linuxppc-dev mailing list