← Back to team overview

maria-developers team mailing list archive

Re: [Commits] f89c9fc: MDEV-7526: TokuDB doesn't build on OS X

 

Hi, Vicentiu!

On Dec 19, Vicentiu Ciorbaru wrote:
> revision-id: f89c9fc4b7b5d82c79775cb848225900b45a6b79 (mariadb-5.5.47-7-gf89c9fc)
> parent(s): 0ed474484c037a32bea32abaecd3ff770f40bd49
> author: Vicențiu Ciorbaru
> committer: Vicențiu Ciorbaru
> timestamp: 2015-12-19 14:14:05 +0200
> message:
> 
> 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.
> 
> ---
>  storage/tokudb/ft-index/buildheader/make_tdb.cc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/storage/tokudb/ft-index/buildheader/make_tdb.cc b/storage/tokudb/ft-index/buildheader/make_tdb.cc
> index 5370664..610ce67 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);
>  }

seems like a backport from 10.0. ok to push

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
-- 
Vote for my Percona Live 2016 talks:
https://www.percona.com/live/data-performance-conference-2016/sessions/mariadb-connectors-fast-and-smart-new-protocol-optimizations#community-voting
https://www.percona.com/live/data-performance-conference-2016/sessions/mariadb-101-security-validation-authentication-encryption#community-voting