Thread (3 messages) 3 messages, 3 authors, 2020-08-18

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

flat view

From: Sachin Sant <hidden>
Date: 2020-08-05 04:58:07

On 04-Aug-2020, at 11:01 PM, Sandipan Das [off-list ref] 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 <redacted>
Suggested-by: David Laight <redacted>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sandipan Das <redacted>
Tested-by: Sachin Sant <redacted>

Thanks
-Sachin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help