]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix building memalign2 test on older FreeBSD
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 12 Oct 2021 19:47:45 +0000 (21:47 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 12 Oct 2021 19:47:45 +0000 (21:47 +0200)
memcheck/tests/memalign2.c

index 95d13354e71691754f2a5ce003e5a9c80c0ff07f..c5a8b0e07c677df2f97186d7258030a22f9bd116 100644 (file)
@@ -16,6 +16,7 @@
 #include <assert.h>
 #include "tests/malloc.h"
 #include <errno.h>
+#include "../../config.h"
 
 int main ( void )
 {
@@ -30,6 +31,7 @@ int main ( void )
    int  res;
    assert(sizeof(long int) == sizeof(void*));
 
+#if !defined(VGO_freebsd) || (FREEBSD_VERS >= FREEBSD_12)
    // Check behaviour of memalign/free for big alignment.
    // In particular, the below aims at checking that a
    // superblock with a big size is not marked as reclaimable
@@ -78,6 +80,7 @@ int main ( void )
 
    p = memalign(4 * 1024 * 1024, 100);   assert(0 == (long)p % (4 * 1024 * 1024));
    p = memalign(16 * 1024 * 1024, 100);   assert(0 == (long)p % (16 * 1024 * 1024));
+#endif
 
 #  define PM(a,b,c) posix_memalign((void**)a, b, c)