From: Arkadiusz Miśkiewicz Date: Tue, 17 Sep 2019 10:57:40 +0000 (+0200) Subject: - rel 9; fix build with openssl 1.1 X-Git-Tag: auto/th/mysql-5.0.96-9 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=81ac6df72857ee07879143a7251ad79c635fd2ff;p=packages%2Fmysql.git - rel 9; fix build with openssl 1.1 --- diff --git a/mysql.spec b/mysql.spec index 4143ad6..20d7e58 100644 --- a/mysql.spec +++ b/mysql.spec @@ -28,7 +28,7 @@ Summary(uk.UTF-8): MySQL - швидкий SQL-сервер Summary(zh_CN.UTF-8): MySQL数据库服务器 Name: mysql Version: 5.0.96 -Release: 8 +Release: 9 License: GPL + MySQL FLOSS Exception Group: Applications/Databases # Source0Download: http://dev.mysql.com/downloads/mysql/5.0.html#source @@ -81,6 +81,7 @@ Patch24: bison3.patch Patch25: %{name}-sslchain.patch Patch26: %{name}-yacc.patch Patch27: community-mysql-dh1024.patch +Patch28: openssl.patch # Patch100: %{name}-show_patches.patch Patch101: %{name}-microslow_innodb.patch @@ -583,6 +584,7 @@ mv sphinx-*/mysqlse sql/sphinx %patch25 -p1 %patch26 -p1 %patch27 -p1 +%patch28 -p1 %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in diff --git a/openssl.patch b/openssl.patch new file mode 100644 index 0000000..20f88b6 --- /dev/null +++ b/openssl.patch @@ -0,0 +1,24 @@ +--- mysql-5.0.96/vio/viosslfactories.c~ 2019-09-17 11:52:59.000000000 +0200 ++++ mysql-5.0.96/vio/viosslfactories.c 2019-09-17 12:14:48.223177024 +0200 +@@ -48,12 +48,18 @@ + DH *dh; + if ((dh=DH_new())) + { +- dh->p=BN_bin2bn(dh1024_p,sizeof(dh1024_p),NULL); +- dh->g=BN_bin2bn(dh1024_g,sizeof(dh1024_g),NULL); ++ BIGNUM* p= BN_bin2bn(dh1024_p,sizeof(dh1024_p),NULL); ++ BIGNUM* g= BN_bin2bn(dh1024_g,sizeof(dh1024_g),NULL); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ dh->p= p; ++ dh->g= g; + if (! dh->p || ! dh->g) ++#else ++ if (!DH_set0_pqg(dh, p, NULL, g)) ++#endif + { + DH_free(dh); +- dh=0; ++ dh=NULL; + } + } + return(dh);