From 1e541d312782c1e3b745ccdacda7b943c0960a60 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 16 Nov 2021 15:13:29 -0500 Subject: [PATCH] stdlib.h: Remove guards around aligned_alloc. While FreeBSD and glibc feature-guard it, they also feature-guard a lot of other things that we don't, and musl does not guard it, so it seems more than safe enough to leave it unguarded. Fixes compilation errors with GCC 11. (The other possible solution was including features.h in more places, but this seems simpler.) --- headers/posix/stdlib.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/headers/posix/stdlib.h b/headers/posix/stdlib.h index 9ab024e472..5f5d586085 100644 --- a/headers/posix/stdlib.h +++ b/headers/posix/stdlib.h @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 Haiku, Inc. All Rights Reserved. + * Copyright 2002-2021 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef _STDLIB_H_ @@ -49,9 +49,7 @@ extern void *calloc(size_t numElements, size_t size); extern void free(void *pointer); extern void *malloc(size_t size); extern int posix_memalign(void **_pointer, size_t alignment, size_t size); -#ifdef _ISOC11_SOURCE extern void *aligned_alloc(size_t alignment, size_t size) _ALIGNED_BY_ARG(1); -#endif extern void *realloc(void *oldPointer, size_t newSize); /* process termination */