Details
Description
/home/ports/pobj/mariadb-10.8.4/bin/c++ -DDBUG_TRACE -DHAVE_CONFIG_H -I/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/wsrep-lib/include -I/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/wsrep-lib/wsrep-API/v26 -I/home/ports/pobj/mariadb-10.8.4/build-amd64/include -I/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/include/providers -I/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/tpool -I/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/include -O2 -pipe -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -std=gnu++11 -MD -MT tpool/CMakeFiles/tpool.dir/tpool_generic.cc.o -MF tpool/CMakeFiles/tpool.dir/tpool_generic.cc.o.d -o tpool/CMakeFiles/tpool.dir/tpool_generic.cc.o -c /home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/tpool/tpool_generic.cc |
In file included from /home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/tpool/tpool_generic.cc:36: |
/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/include/aligned.h:27:10: error: use of undeclared identifier 'aligned_alloc'; did you mean 'aligned_malloc'? |
return aligned_alloc(alignment, size); |
^~~~~~~~~~~~~
|
aligned_malloc
|
/home/ports/pobj/mariadb-10.8.4/mariadb-10.8.4/include/aligned.h:22:14: note: 'aligned_malloc' declared here |
inline void *aligned_malloc(size_t size, size_t alignment)
|
^
|
1 error generated.
|
Attachments
Issue Links
- is caused by
-
MDEV-28836 Correcting the cache alignment for Table_cache_instance.
-
- Closed
-
aligned_alloc() is defined in the standard ISO/IEC 9899:2011 a.k.a. C11. Because some systems do not support it yet, I implemented a compile-time check HAVE_ALIGNED_ALLOC.
We do not have OpenBSD in our CI systems. Can you please check if the following patch would fix this?
diff --git a/include/aligned.h b/include/aligned.h
index 0ae1f0d0848..2ae2c9e78f1 100644
--- a/include/aligned.h
+++ b/include/aligned.h
@@ -15,6 +15,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#ifdef HAVE_ALIGNED_ALLOC
+# include <stdlib.h>
#elif defined __linux__
# include <malloc.h>