From 00ad632b72a81128edc28a91b3a93307e8a511e7 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Mon, 11 Mar 2024 11:44:18 +0100 Subject: [PATCH] databases/rubygem-mysql: fix runtime warnings with ruby 3.2 --- databases/rubygem-mysql/Makefile | 2 +- .../rubygem-mysql/files/patch-ext-mysql_api-mysql.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/databases/rubygem-mysql/Makefile b/databases/rubygem-mysql/Makefile index a70a4cb701ce..41655af7f89c 100644 --- a/databases/rubygem-mysql/Makefile +++ b/databases/rubygem-mysql/Makefile @@ -1,6 +1,6 @@ PORTNAME= mysql PORTVERSION= 2.9.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= databases rubygems MASTER_SITES= RG 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 8c149b217372..c7d41962b868 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 2024-03-11 10:13:55 UTC +--- ext/mysql_api/mysql.c.orig 2024-03-11 10:33:12 UTC +++ ext/mysql_api/mysql.c @@ -170,7 +170,7 @@ static void mysql_raise(MYSQL* m) VALUE e = rb_exc_new2(eMysql, mysql_error(m)); @@ -241,11 +241,16 @@ int i; int dots = 0; const char *lib = mysql_get_client_info(); -@@ -1898,6 +1913,7 @@ void Init_mysql_api(void) +@@ -1898,9 +1913,12 @@ void Init_mysql_api(void) return; } } +#endif cMysql = rb_define_class("Mysql", rb_cObject); ++ rb_undef_alloc_func(cMysql); cMysqlRes = rb_define_class_under(cMysql, "Result", rb_cObject); ++ rb_undef_alloc_func(cMysqlRes); + cMysqlField = rb_define_class_under(cMysql, "Field", rb_cObject); + #if MYSQL_VERSION_ID >= 40102 + cMysqlStmt = rb_define_class_under(cMysql, "Stmt", rb_cObject);