Skip to content

Commit

Permalink
Fix compilation without dlopen
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jan 22, 2018
1 parent 906ce09 commit 204cb85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/my_global.h
Expand Up @@ -1376,7 +1376,7 @@ static inline char *dlerror(void)
#ifndef HAVE_DLADDR
#define dladdr(A, B) 0
/* Dummy definition in case we're missing dladdr() */
typedef int Dl_info;
typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
#endif
#else
#define dlerror() "No support for dynamic loading (static build?)"
Expand All @@ -1385,7 +1385,7 @@ typedef int Dl_info;
#define dlclose(A) 0
#define dladdr(A, B) 0
/* Dummy definition in case we're missing dladdr() */
typedef int Dl_info;
typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
#endif

/*
Expand Down
2 changes: 2 additions & 0 deletions sql/item_func.cc
Expand Up @@ -595,6 +595,7 @@ my_decimal *Item_real_func::val_decimal(my_decimal *decimal_value)
}


#ifdef HAVE_DLOPEN
void Item_udf_func::fix_num_length_and_dec()
{
uint fl_length= 0;
Expand All @@ -611,6 +612,7 @@ void Item_udf_func::fix_num_length_and_dec()
max_length= float_length(NOT_FIXED_DEC);
}
}
#endif


/**
Expand Down
5 changes: 5 additions & 0 deletions sql/sql_plugin.cc
Expand Up @@ -477,6 +477,11 @@ static st_plugin_dl *plugin_dl_insert_or_reuse(struct st_plugin_dl *plugin_dl)
sizeof(struct st_plugin_dl));
DBUG_RETURN(tmp);
}
#else
static struct st_plugin_dl *plugin_dl_find(const LEX_STRING *)
{
return 0;
}
#endif /* HAVE_DLOPEN */


Expand Down
2 changes: 1 addition & 1 deletion storage/tokudb/CMakeLists.txt
@@ -1,6 +1,6 @@
# ft-index only supports x86-64 and cmake-2.8.9+
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
NOT CMAKE_VERSION VERSION_LESS "2.8.9")
NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND HAVE_DLSYM)
CHECK_CXX_SOURCE_COMPILES(
"
struct a {int b; int c; };
Expand Down

0 comments on commit 204cb85

Please sign in to comment.