diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2015-12-19 13:25:55 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2015-12-19 14:14:05 +0200 |
commit | f89c9fc4b7b5d82c79775cb848225900b45a6b79 (patch) | |
tree | 1853b483fdb723ba775cc8b9dc62ec05f4071830 /storage | |
parent | 0ed474484c037a32bea32abaecd3ff770f40bd49 (diff) | |
download | mariadb-git-f89c9fc4b7b5d82c79775cb848225900b45a6b79.tar.gz |
MDEV-7526: TokuDB doesn't build on OS X
This patch fixes one compilation error related to __db_lsn struct. The
struct can not be defined as empty according to the main C standard.
In C++, this is handled by forcing a size of 1. To eliminate the error
we add a dummy char field of size 1. This has no effect on the C++
compiled code, but also removes the compiler error.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/tokudb/ft-index/buildheader/make_tdb.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/tokudb/ft-index/buildheader/make_tdb.cc b/storage/tokudb/ft-index/buildheader/make_tdb.cc index 53706649231..610ce670db5 100644 --- a/storage/tokudb/ft-index/buildheader/make_tdb.cc +++ b/storage/tokudb/ft-index/buildheader/make_tdb.cc @@ -481,7 +481,9 @@ static void print_db_key_range_struct (void) { static void print_db_lsn_struct (void) { field_counter=0; - sort_and_dump_fields("db_lsn", false, NULL); + /* A dummy field to make sizeof(DB_LSN) equal in C and C++ */ + const char *extra[] = { "char dummy", NULL }; + sort_and_dump_fields("db_lsn", false, extra); } static void print_dbt_struct (void) { |