Build is broken on illumos due to isinf usage

Bug #1536565 reported by Alexander Pyhalov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

This time the following change caused issue on OpenIndiana:
diff -ur percona-server-5.5.36-34.2/storage/myisam/rt_split.c percona-server-5.5.47-37.7/storage/myisam/rt_split.c
--- percona-server-5.5.36-34.2/storage/myisam/rt_split.c 2014-03-25 17:10:46.000000000 +0400
+++ percona-server-5.5.47-37.7/storage/myisam/rt_split.c 2016-01-09 00:32:34.000000000 +0300
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -68,6 +68,10 @@
     b += 2;
   }while (a != end);

+ /* Check for infinity or NaN */
+ if (my_isinf(square) || isnan(square))
+ square = DBL_MAX;
+
   return square;
 }

@@ -102,6 +106,9 @@

my_isinf refers to isinf() and it is available only in C++ or C99 on Solaris/illumos. The following patch fixes this:

--- percona-server-5.5.47-37.7/storage/myisam/CMakeLists.txt.1 2016-01-21 13:17:39.975865479 +0300
+++ percona-server-5.5.47-37.7/storage/myisam/CMakeLists.txt 2016-01-21 13:18:53.407309749 +0300
@@ -26,6 +26,7 @@
                                rt_split.c sort.c sp_key.c mi_extrafunc.h myisamdef.h
                                rt_index.h mi_rkey.c)

+SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99" )
 MYSQL_ADD_PLUGIN(myisam ${MYISAM_SOURCES}
   STORAGE_ENGINE
   MANDATORY

Tags: contribution
tags: added: contribution
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3364

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.