diff options
author | David Carlier <devnexen@gmail.com> | 2017-11-16 10:02:29 +0800 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-11-17 13:55:14 +0800 |
commit | 685db2c112b9d5d59a78835d444e23cf754cda7f (patch) | |
tree | 9f915b5ef49888dbc49a5207cebb8034e842a57b | |
parent | 4666f015349e5bdd3b7ee3b2eedf50020a460e5b (diff) | |
download | mariadb-git-685db2c112b9d5d59a78835d444e23cf754cda7f.tar.gz |
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
-rw-r--r-- | sql/wsrep_mysqld.cc | 2 | ||||
-rw-r--r-- | storage/connect/reldef.cpp | 14 | ||||
-rw-r--r-- | storage/tokudb/CMakeLists.txt | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 33689a91661..bdc8491080d 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -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; diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 031fdebe650..0fb24baa785 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -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++) { diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index c959bf00d26..4e0291545ec 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -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() |