[Commits] 8d1fbea: MDEV-9618 solaris sparc build fails on 10.1.

Alexey Botchkov holyfoot at askmonty.org
Mon May 2 11:17:58 EEST 2016


revision-id: 8d1fbea30e2efe9209b8b190122bad4442555c53 (mariadb-10.1.13-23-g8d1fbea)
parent(s): ad4239cc3dc7ad5f6f264e1fb3cf6d24084bda90
committer: Alexey Botchkov
timestamp: 2016-05-02 12:16:23 +0400
message:

MDEV-9618 solaris sparc build fails on 10.1.

        Compiler on Solaris is sensitive to the C/C++ call model
        differences. So it fails if these are mixed in the '?' operator
        arguments.
        Fixed by changing the '?' with the 'if ()' construction.

---
 sql/encryption.cc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/sql/encryption.cc b/sql/encryption.cc
index 209b092..0c36d53 100644
--- a/sql/encryption.cc
+++ b/sql/encryption.cc
@@ -57,12 +57,16 @@ int initialize_encryption_plugin(st_plugin_int *plugin)
   st_mariadb_encryption *handle=
     (struct st_mariadb_encryption*) plugin->plugin->info;
 
-  encryption_handler.encryption_ctx_size_func=
-    handle->crypt_ctx_size ? handle->crypt_ctx_size :
-    (uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
-
-  encryption_handler.encryption_ctx_init_func=
-    handle->crypt_ctx_init ? handle->crypt_ctx_init : ctx_init;
+  if (handle->crypt_ctx_size)
+    encryption_handler.encryption_ctx_size_func= handle->crypt_ctx_size;
+  else
+    encryption_handler.encryption_ctx_size_func=
+      (uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
+
+  if (handle->crypt_ctx_init)
+    encryption_handler.encryption_ctx_init_func= handle->crypt_ctx_init;
+  else
+    encryption_handler.encryption_ctx_init_func= ctx_init;
 
   encryption_handler.encryption_ctx_update_func=
     handle->crypt_ctx_update ? handle->crypt_ctx_update : my_aes_crypt_update;


More information about the commits mailing list