Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/testing/selftests/ptrace/peeksiginfo.c: add PAGE_SIZE definition

On IBM powerpc where multiple page size value are supported, current
ppc64 and ppc64el distro don't define the PAGE_SIZE variable in
/usr/include as this is a dynamic value retrieved by the getpagesize()
or sysconf() defined in unistd.h. The PAGE_SIZE variable sounds defined
when only one value is supported by the kernel.

As such, when the PAGE_SIZE definition doesn't exist system should
retrieve the dynamic value.

Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
Cc: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Thierry Fauck and committed by
Linus Torvalds
8b6aaf65 89b3ac63

+4
+4
tools/testing/selftests/ptrace/peeksiginfo.c
··· 31 31 #define TEST_SICODE_PRIV -1 32 32 #define TEST_SICODE_SHARE -2 33 33 34 + #ifndef PAGE_SIZE 35 + #define PAGE_SIZE sysconf(_SC_PAGESIZE) 36 + #endif 37 + 34 38 #define err(fmt, ...) \ 35 39 fprintf(stderr, \ 36 40 "Error (%s:%d): " fmt, \