Sandipan Das <sandi...@linux.ibm.com> writes: > On some distros, there are conflicts w.r.t to redefinition > of pkey syscall numbers which cause build failures. This > fixes them. > > Reported-by: Sachin Sant <sach...@linux.vnet.ibm.com> > Signed-off-by: Sandipan Das <sandi...@linux.ibm.com> > --- > Previous versions can be found at: > v1: > https://lore.kernel.org/linuxppc-dev/20200803074043.466809-1-sandi...@linux.ibm.com/ > > Changes in v2: > - Fix incorrect commit message. > > --- > tools/testing/selftests/powerpc/include/pkeys.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/testing/selftests/powerpc/include/pkeys.h > b/tools/testing/selftests/powerpc/include/pkeys.h > index 6ba95039a034..26eef5c1f8ea 100644 > --- a/tools/testing/selftests/powerpc/include/pkeys.h > +++ b/tools/testing/selftests/powerpc/include/pkeys.h > @@ -31,8 +31,13 @@ > > #define SI_PKEY_OFFSET 0x20 > > +#undef SYS_pkey_mprotect > #define SYS_pkey_mprotect 386
We shouldn't undef them. They should obviously never change, but if the system headers already have a definition then we should use that, so I think it should be: #ifndef SYS_pkey_mprotect #define SYS_pkey_mprotect 386 #endif cheers