]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Unbreak build on Mac_OS where __NR_mprotect is not defined.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 24 Sep 2012 21:37:02 +0000 (21:37 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 24 Sep 2012 21:37:02 +0000 (21:37 +0000)
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

memcheck/tests/leak-segv-jmp.c
memcheck/tests/leak-segv-jmp.stderr.exp

index d2267c31ba2f7ca40b14e9b518ff85d7aeb7fa90..8856419429dd2073701191333174dcf2f3647020 100644 (file)
@@ -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
index be567da0f85e11b2ba597a188c44507df0b713cf..ae4b7862a454a145ba1fd1e0f8f5272498e9ccde 100644 (file)
@@ -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