From: Paul Floyd Date: Tue, 12 Oct 2021 19:47:45 +0000 (+0200) Subject: Fix building memalign2 test on older FreeBSD X-Git-Tag: VALGRIND_3_18_0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79a1439786c18f0d38f230616c1ab06b9255577f;p=thirdparty%2Fvalgrind.git Fix building memalign2 test on older FreeBSD --- diff --git a/memcheck/tests/memalign2.c b/memcheck/tests/memalign2.c index 95d13354e7..c5a8b0e07c 100644 --- a/memcheck/tests/memalign2.c +++ b/memcheck/tests/memalign2.c @@ -16,6 +16,7 @@ #include #include "tests/malloc.h" #include +#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)