databases/mysql-connector-c: Fix build with Clang 6

sql-common/client_authentication.cc:86:56: error: comparison between pointer and integer ('char *' and 'int')
      mysql->options.extension->server_public_key_path != '\0')
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~

http://beefy12.nyi.freebsd.org/data/head-amd64-default/p479076_s338486/logs/errors/mysql-connector-c-6.1.11.log

PR:		230959
Approved by:	bofh (maintainer timeout, 2 weeks)
This commit is contained in:
Tobias Kortkamp 2018-09-10 15:26:04 +00:00
parent ed162325bd
commit 7d3e88a564
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=479432

View File

@ -0,0 +1,15 @@
sql-common/client_authentication.cc:86:56: error: comparison between pointer and integer ('char *' and 'int')
mysql->options.extension->server_public_key_path != '\0')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
--- sql-common/client_authentication.cc.orig 2018-08-27 19:39:51 UTC
+++ sql-common/client_authentication.cc
@@ -83,7 +83,7 @@ RSA *rsa_init(MYSQL *mysql)
if (mysql->options.extension != NULL &&
mysql->options.extension->server_public_key_path != NULL &&
- mysql->options.extension->server_public_key_path != '\0')
+ *mysql->options.extension->server_public_key_path != '\0')
{
pub_key_file= fopen(mysql->options.extension->server_public_key_path,
"r");