From: Paul Floyd Date: Sun, 7 Sep 2025 07:50:33 +0000 (+0200) Subject: aligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b68bf7603565676f8e7ee2f18f8dc6f84eef1dc7;p=thirdparty%2Fvalgrind.git aligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero --- diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 1df4419ca..d88f55f8b 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -2299,16 +2299,16 @@ extern int * __error(void) __attribute__((weak)); #define VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR 0 #endif -#if defined(VGO_freebsd) || defined(VGO_solaris) -#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 1 +#if defined(VGO_solaris) +#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 1 #else -#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 0 +#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 0 #endif -#if defined(VGO_freebsd) || defined(MUSL_LIBC) -#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 0 +#if defined(MUSL_LIBC) +#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 0 #else -#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 1 +#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 1 #endif #if defined (VGO_linux) && !defined(MUSL_LIBC) && !defined(HAVE_GNU_LIBC_C17_ALIGNED_ALLOC)