From: miod Date: Tue, 5 Mar 2024 19:27:47 +0000 (+0000) Subject: Ugly workaround to let this compile again on non-clang platforms. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cf53fb4854669efed9bef10b4eed26d327d1f726;p=openbsd Ugly workaround to let this compile again on non-clang platforms. --- diff --git a/regress/lib/libc/atexit/atexit_test.c b/regress/lib/libc/atexit/atexit_test.c index b060a9b341f..f00a81a6c91 100644 --- a/regress/lib/libc/atexit/atexit_test.c +++ b/regress/lib/libc/atexit/atexit_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atexit_test.c,v 1.9 2017/07/27 15:08:37 bluhm Exp $ */ +/* $OpenBSD: atexit_test.c,v 1.10 2024/03/05 19:27:47 miod Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier @@ -40,6 +40,14 @@ #include #include +/* + * XXX Provide a prototype for aligned_alloc on pre-C11 compilers to prevent + * inclusion of hidden/stdlib.h below to cause a missing prototype error. + */ +#if (__ISO_C_VISIBLE - 0) < 2011 +void *aligned_alloc(size_t, size_t); +#endif + #include "include/namespace.h" #include "hidden/stdlib.h" #include "stdlib/atexit.h"