mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01: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:
parent
4666f01534
commit
685db2c112
3 changed files with 10 additions and 10 deletions
|
@ -1976,7 +1976,7 @@ static bool abort_replicated(THD *thd)
|
|||
bool ret_code= false;
|
||||
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);
|
||||
ret_code= true;
|
||||
|
|
|
@ -547,14 +547,12 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
|
|||
} // endif dladdr
|
||||
#endif // 0
|
||||
|
||||
// Is the library already loaded?
|
||||
if (!Hdll && !(Hdll = dlopen(soname, RTLD_NOLOAD)))
|
||||
// Load the desired shared library
|
||||
if (!(Hdll = dlopen(soname, RTLD_LAZY))) {
|
||||
error = dlerror();
|
||||
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
|
||||
return NULL;
|
||||
} // endif Hdll
|
||||
// Load the desired shared library
|
||||
if (!Hdll && !(Hdll = dlopen(soname, RTLD_LAZY))) {
|
||||
error = dlerror();
|
||||
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
|
||||
return NULL;
|
||||
} // endif Hdll
|
||||
|
||||
// The exported name is always in uppercase
|
||||
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")
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
|
||||
# tokudb requires F_NOCACHE, O_DIRECT, and designated initializers
|
||||
CHECK_CXX_SOURCE_COMPILES(
|
||||
"
|
||||
#include <fcntl.h>
|
||||
struct a {int b; int c; };
|
||||
struct a d = { .b=1, .c=2 };
|
||||
int main() { return 0; }
|
||||
int main() { return F_NOCACHE + O_DIRECT; }
|
||||
" TOKUDB_OK)
|
||||
ENDIF()
|
||||
|
||||
|
|
Loading…
Reference in a new issue