Skip to content

Commit 685db2c

Browse files
devnexenvuvova
authored andcommitted
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
1 parent 4666f01 commit 685db2c

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

sql/wsrep_mysqld.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,7 @@ static bool abort_replicated(THD *thd)
19761976
bool ret_code= false;
19771977
if (thd->wsrep_query_state== QUERY_COMMITTING)
19781978
{
1979-
WSREP_DEBUG("aborting replicated trx: %lu", thd->real_id);
1979+
WSREP_DEBUG("aborting replicated trx: %llu", (ulonglong)(thd->real_id));
19801980

19811981
(void)wsrep_abort_thd(thd, thd, TRUE);
19821982
ret_code= true;

storage/connect/reldef.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,12 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
547547
} // endif dladdr
548548
#endif // 0
549549

550-
// Is the library already loaded?
551-
if (!Hdll && !(Hdll = dlopen(soname, RTLD_NOLOAD)))
552-
// Load the desired shared library
553-
if (!(Hdll = dlopen(soname, RTLD_LAZY))) {
554-
error = dlerror();
555-
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
556-
return NULL;
557-
} // endif Hdll
550+
// Load the desired shared library
551+
if (!Hdll && !(Hdll = dlopen(soname, RTLD_LAZY))) {
552+
error = dlerror();
553+
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
554+
return NULL;
555+
} // endif Hdll
558556

559557
// The exported name is always in uppercase
560558
for (int i = 0; ; i++) {

storage/tokudb/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ IF(CMAKE_VERSION VERSION_LESS "2.8.9")
44
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
55
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
66
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
7+
# tokudb requires F_NOCACHE, O_DIRECT, and designated initializers
78
CHECK_CXX_SOURCE_COMPILES(
89
"
10+
#include <fcntl.h>
911
struct a {int b; int c; };
1012
struct a d = { .b=1, .c=2 };
11-
int main() { return 0; }
13+
int main() { return F_NOCACHE + O_DIRECT; }
1214
" TOKUDB_OK)
1315
ENDIF()
1416

0 commit comments

Comments
 (0)