summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-11-07 14:13:46 +1100
committerDaniel Black <daniel@mariadb.org>2022-11-07 14:35:47 +1100
commitdff2b8c520a7b0dd9d862c4a5980350a6bec7ffc (patch)
treeab801abdd5941fc75aa8bb0079d4c37ebfd9a3cb
parent92be8d20480ee0e2fb8ec72c005648f2573558ce (diff)
downloadmariadb-git-bb-10.3-danielblack-alloca_h_service-pkgtest.tar.gz
service_encryption.h HAVE_ALLOC_H was globalbb-10.3-danielblack-alloca_h_service-pkgtest
Rather than global include for header files, we use cmake to make service_encryption.h a generated file and populate it with the discovery of ALLOCA_H or not. Fixes: #2289 Closes: #2321
-rw-r--r--CMakeLists.txt2
-rw-r--r--include/CMakeLists.txt1
-rw-r--r--include/mysql/service_encryption.h.in (renamed from include/mysql/service_encryption.h)1
3 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5aad228843f..0c59b60e16f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -490,6 +490,8 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
${CMAKE_BINARY_DIR}/include/mysql_version.h )
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql/service_encryption.h.in
+ ${CMAKE_BINARY_DIR}/include/mysql/service_encryption.h)
IF(GIT_EXECUTABLE AND EXISTS ${PROJECT_SOURCE_DIR}/.git)
EXECUTE_PROCESS(
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index a7b98a11050..582596481d8 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -19,6 +19,7 @@ SET(HEADERS_GEN_CONFIGURE
mysqld_ername.h
mysqld_error.h
sql_state.h
+ mysql/service_encryption.h
)
SET(HEADERS
diff --git a/include/mysql/service_encryption.h b/include/mysql/service_encryption.h.in
index 69d205a27e8..0d7b85a8b53 100644
--- a/include/mysql/service_encryption.h
+++ b/include/mysql/service_encryption.h.in
@@ -36,6 +36,7 @@ extern "C" {
#endif
#else
#include <stdlib.h>
+#cmakedefine HAVE_ALLOCA_H 1
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif