selftests: PAGE_SIZE may not be defined
PATCH 1/1 selftests: PAGE_SIZE may not be defined
Hi Ben,
The following patch seems relevant for Ubuntu and Debian distro testing. I know it's minor but I need to know if you do you care about it or sif I should remove it from the bugs info.
Thanks
Best regards
Thierry
#---------------------------------------------------------------------------------------------------
Quoted 1 line
From
48a9a9834377a74b603be12dcc76cda24105e33cMon Sep 17 00:00:00 2001
From: Thierry Fauck <[email protected]>
Date: Fri, 28 Feb 2014 16:17:50 +0100
Subject: [PATCH] selftests: PAGE_SIZE may not be defined
Some systems have a dynamic PAGE_SIZE value and do not add a definition for PAGE_SIZE. This value will have to be retrieved using getpagesize() or sysconf().
--- tools/testing/selftests/ptrace/peeksiginfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
(quoted diff) +0 -0
b/tools/testing/selftests/ptrace/peeksiginfo.c
index d46558b..f2ccbbd 100644
tools/testing/selftests/ptrace/peeksiginfo.c +0 -0
@@ -35,7 +35,9 @@ static int sys_ptrace(int request, pid_t pid, void
*addr, void *data)
fprintf(stderr, \
"Error (%s:%d): " fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)-
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
+#endif
static int check_error_paths(pid_t child)
{
struct ptrace_peeksiginfo_args arg;
--
1.9.0
Signature · 1 line
Thierry Fauck ([email protected])
Quoted 6 lines · Thierry Fauck
Hi Ben,
The following patch seems relevant for Ubuntu and Debian distro testing.
I know it's minor but I need to know if you do you care about it or sif I should remove it from the bugs info.
You should send it to whoever maintains that file...
Cheers,
Ben.
Quoted 51 lines
Thanks
Best regards
Thierry#---------------------------------------------------------------------------------------------------
From
48a9a9834377a74b603be12dcc76cda24105e33cMon Sep 17 00:00:00 2001From: Thierry Fauck <[email protected]>
Date: Fri, 28 Feb 2014 16:17:50 +0100
Subject: [PATCH] selftests:PAGE_SIZEmay not be definedSome systems have a dynamic
PAGE_SIZEvalue and do not add a definition
forPAGE_SIZE. This value will have to be retrieved usinggetpagesize()
orsysconf().Signed-off-by Thierry Fauck <[email protected]>--- tools/testing/selftests/ptrace/peeksiginfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/testing/selftests/ptrace/peeksiginfo.c +3
-1@@ -35,7 +35,9 @@ static int sys_ptrace(int request, pid_t pid, void *addr, void *data) fprintf(stderr, \ "Error (%s:%d): " fmt, \ __FILE__, __LINE__, ##__VA_ARGS__) - +#ifndef PAGE_SIZE +#define PAGE_SIZE sysconf(_SC_PAGESIZE) +#endif static int check_error_paths (pid_t child) {struct
ptrace_peeksiginfo_argsarg;
--
1.9.0Signature · 5 lines
Thierry Fauck ([email protected]) _______________________________________________ Linuxppc-dev mailing list [email protected] https://lists.ozlabs.org/listinfo/linuxppc-dev