git: 9fe49ab33156 - main - databases/rubygem-mysql: Fix build with Ruby 3.x
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Mar 2022 07:30:01 UTC
The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=9fe49ab331560260c2a2a9b5510a8fae4d5fa150 commit 9fe49ab331560260c2a2a9b5510a8fae4d5fa150 Author: Yasuhiro Kimura <yasu@FreeBSD.org> AuthorDate: 2022-03-10 04:16:53 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2022-03-29 07:29:14 +0000 databases/rubygem-mysql: Fix build with Ruby 3.x PR: 262526 Approved by: maintainer timeout --- .../rubygem-mysql/files/patch-ext-mysql_api-mysql.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/databases/rubygem-mysql/files/patch-ext-mysql_api-mysql.c b/databases/rubygem-mysql/files/patch-ext-mysql_api-mysql.c index 749e6b92282c..b7f8cf385303 100644 --- a/databases/rubygem-mysql/files/patch-ext-mysql_api-mysql.c +++ b/databases/rubygem-mysql/files/patch-ext-mysql_api-mysql.c @@ -1,4 +1,4 @@ ---- ext/mysql_api/mysql.c.orig 2020-05-29 23:08:40 UTC +--- ext/mysql_api/mysql.c.orig 2022-03-10 04:04:50 UTC +++ ext/mysql_api/mysql.c @@ -273,7 +273,10 @@ static VALUE real_connect(int argc, VALUE* argv, VALUE rb_thread_start_timer(); @@ -22,6 +22,21 @@ GetMysqlStruct(obj)->connection = Qtrue; return obj; +@@ -875,12 +881,12 @@ static VALUE stmt_init(VALUE obj) + MYSQL *m = GetHandler(obj); + MYSQL_STMT *s; + struct mysql_stmt* stmt; +- my_bool true = 1; ++ my_bool mytrue = 1; + VALUE st_obj; + + if ((s = mysql_stmt_init(m)) == NULL) + mysql_raise(m); +- if (mysql_stmt_attr_set(s, STMT_ATTR_UPDATE_MAX_LENGTH, &true)) ++ if (mysql_stmt_attr_set(s, STMT_ATTR_UPDATE_MAX_LENGTH, &mytrue)) + rb_raise(rb_eArgError, "mysql_stmt_attr_set() failed"); + st_obj = Data_Make_Struct(cMysqlStmt, struct mysql_stmt, 0, free_mysqlstmt, stmt); + memset(stmt, 0, sizeof(*stmt)); @@ -917,13 +923,21 @@ static VALUE query_with_result_set(VALUE obj, VALUE fl /* reconnect() */ static VALUE reconnect(VALUE obj)