From 74a34d4ff1cb9a144ecfb54d0656fb3e4f54e0d1 Mon Sep 17 00:00:00 2001 From: jeremy Date: Fri, 6 Jan 2017 15:55:38 +0000 Subject: [PATCH] Add patch to allow building with ruby 2.4.0 No change for earlier versions, so no bump. --- .../patches/patch-ext_mysql_api_mysql_c | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 databases/ruby-mysql/patches/patch-ext_mysql_api_mysql_c diff --git a/databases/ruby-mysql/patches/patch-ext_mysql_api_mysql_c b/databases/ruby-mysql/patches/patch-ext_mysql_api_mysql_c new file mode 100644 index 00000000000..8c0bc27d129 --- /dev/null +++ b/databases/ruby-mysql/patches/patch-ext_mysql_api_mysql_c @@ -0,0 +1,27 @@ +$OpenBSD: patch-ext_mysql_api_mysql_c,v 1.1 2017/01/06 15:55:38 jeremy Exp $ + +Allow building with ruby 2.4+. + +--- ext/mysql_api/mysql.c.orig Wed Dec 31 16:00:00 1969 ++++ ext/mysql_api/mysql.c Tue Oct 18 14:23:24 2016 +@@ -3,6 +3,7 @@ + */ + + #include ++#include + #ifndef RSTRING_PTR + #define RSTRING_PTR(str) RSTRING(str)->ptr + #endif +@@ -1317,7 +1318,11 @@ static VALUE stmt_bind_result(int argc, VALUE *argv, V + } + else if (argv[i] == rb_cString) + s->result.bind[i].buffer_type = MYSQL_TYPE_STRING; +- else if (argv[i] == rb_cNumeric || argv[i] == rb_cInteger || argv[i] == rb_cFixnum) ++ else if (argv[i] == rb_cNumeric || argv[i] == rb_cInteger ++#if (RUBY_API_VERSION_CODE < 20400) ++ || argv[i] == rb_cFixnum ++#endif ++ ) + s->result.bind[i].buffer_type = MYSQL_TYPE_LONGLONG; + else if (argv[i] == rb_cFloat) + s->result.bind[i].buffer_type = MYSQL_TYPE_DOUBLE;