From: Philippe Waroquiers Date: Mon, 24 Sep 2012 21:37:02 +0000 (+0000) Subject: Unbreak build on Mac_OS where __NR_mprotect is not defined. X-Git-Tag: svn/VALGRIND_3_9_0~654 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76e93ca812f20aeeb04e21fbd34ff0c8c5ab9757;p=thirdparty%2Fvalgrind.git Unbreak build on Mac_OS where __NR_mprotect is not defined. The test is not executed on Darwin but should compile. (based on fix suggestion by Rich Coe) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13014 --- diff --git a/memcheck/tests/leak-segv-jmp.c b/memcheck/tests/leak-segv-jmp.c index d2267c31ba..8856419429 100644 --- a/memcheck/tests/leak-segv-jmp.c +++ b/memcheck/tests/leak-segv-jmp.c @@ -136,6 +136,10 @@ UWord do_syscall_WRK ( } #else +// Ensure the file compiles even if the syscall nr is not defined. +#ifndef __NR_mprotect +#define __NR_mprotect 0 +#endif UWord do_syscall_WRK (UWord syscall_no, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6 diff --git a/memcheck/tests/leak-segv-jmp.stderr.exp b/memcheck/tests/leak-segv-jmp.stderr.exp index be567da0f8..ae4b7862a4 100644 --- a/memcheck/tests/leak-segv-jmp.stderr.exp +++ b/memcheck/tests/leak-segv-jmp.stderr.exp @@ -14,8 +14,8 @@ To see them, rerun with: --leak-check=full --show-reachable=yes expecting a leak 1,000 bytes in 1 blocks are definitely lost in loss record ... of ... at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: f (leak-segv-jmp.c:167) - by 0x........: main (leak-segv-jmp.c:214) + by 0x........: f (leak-segv-jmp.c:171) + by 0x........: main (leak-segv-jmp.c:218) LEAK SUMMARY: definitely lost: 1,000 bytes in 1 blocks @@ -30,8 +30,8 @@ mprotect result 0 expecting a leak again 1,000 bytes in 1 blocks are definitely lost in loss record ... of ... at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: f (leak-segv-jmp.c:167) - by 0x........: main (leak-segv-jmp.c:214) + by 0x........: f (leak-segv-jmp.c:171) + by 0x........: main (leak-segv-jmp.c:218) LEAK SUMMARY: definitely lost: 1,000 bytes in 1 blocks