Ugly workaround to let this compile again on non-clang platforms.
authormiod <miod@openbsd.org>
Tue, 5 Mar 2024 19:27:47 +0000 (19:27 +0000)
committermiod <miod@openbsd.org>
Tue, 5 Mar 2024 19:27:47 +0000 (19:27 +0000)
regress/lib/libc/atexit/atexit_test.c

index b060a9b..f00a81a 100644 (file)
@@ -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
 #include <signal.h>
 #include <unistd.h>
 
+/*
+ * 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"