mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix the build on OpenBSD (#488)
* cast pthread_t for printf * don't use RTLD_NOLOAD * tokudb fails without F_NOCACHE and O_DIRECT - ditto
This commit is contained in:
committed by
Sergei Golubchik
parent
4666f01534
commit
685db2c112
@ -1976,7 +1976,7 @@ static bool abort_replicated(THD *thd)
|
|||||||
bool ret_code= false;
|
bool ret_code= false;
|
||||||
if (thd->wsrep_query_state== QUERY_COMMITTING)
|
if (thd->wsrep_query_state== QUERY_COMMITTING)
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("aborting replicated trx: %lu", thd->real_id);
|
WSREP_DEBUG("aborting replicated trx: %llu", (ulonglong)(thd->real_id));
|
||||||
|
|
||||||
(void)wsrep_abort_thd(thd, thd, TRUE);
|
(void)wsrep_abort_thd(thd, thd, TRUE);
|
||||||
ret_code= true;
|
ret_code= true;
|
||||||
|
@ -547,14 +547,12 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
|
|||||||
} // endif dladdr
|
} // endif dladdr
|
||||||
#endif // 0
|
#endif // 0
|
||||||
|
|
||||||
// Is the library already loaded?
|
// Load the desired shared library
|
||||||
if (!Hdll && !(Hdll = dlopen(soname, RTLD_NOLOAD)))
|
if (!Hdll && !(Hdll = dlopen(soname, RTLD_LAZY))) {
|
||||||
// Load the desired shared library
|
error = dlerror();
|
||||||
if (!(Hdll = dlopen(soname, RTLD_LAZY))) {
|
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
|
||||||
error = dlerror();
|
return NULL;
|
||||||
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
|
} // endif Hdll
|
||||||
return NULL;
|
|
||||||
} // endif Hdll
|
|
||||||
|
|
||||||
// The exported name is always in uppercase
|
// The exported name is always in uppercase
|
||||||
for (int i = 0; ; i++) {
|
for (int i = 0; ; i++) {
|
||||||
|
@ -4,11 +4,13 @@ IF(CMAKE_VERSION VERSION_LESS "2.8.9")
|
|||||||
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
|
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
|
||||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
|
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
|
||||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
|
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
|
||||||
|
# tokudb requires F_NOCACHE, O_DIRECT, and designated initializers
|
||||||
CHECK_CXX_SOURCE_COMPILES(
|
CHECK_CXX_SOURCE_COMPILES(
|
||||||
"
|
"
|
||||||
|
#include <fcntl.h>
|
||||||
struct a {int b; int c; };
|
struct a {int b; int c; };
|
||||||
struct a d = { .b=1, .c=2 };
|
struct a d = { .b=1, .c=2 };
|
||||||
int main() { return 0; }
|
int main() { return F_NOCACHE + O_DIRECT; }
|
||||||
" TOKUDB_OK)
|
" TOKUDB_OK)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user