[DRE-commits] [ruby-mysql2] 01/01: Fix FTBFS on Big Endian architectures caused by wrong size of YEAR type

zeha at debian.org zeha at debian.org
Sat Feb 27 20:30:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch master
in repository ruby-mysql2.

commit 2623bfeb2bea91d66ed6df309a9e7ea8e8b141c8
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Sat Feb 27 20:29:34 2016 +0000

    Fix FTBFS on Big Endian architectures caused by wrong size of YEAR type
---
 debian/changelog                    |  7 +++++++
 debian/patches/series               |  1 +
 debian/patches/type-year-size.patch | 39 +++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1748054..ea1b3b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-mysql2 (0.4.3-2) unstable; urgency=medium
+
+  * Team upload.
+  * Fix FTBFS on Big Endian architectures caused by wrong size of YEAR type.
+
+ -- Christian Hofstaedtler <zeha at debian.org>  Sat, 27 Feb 2016 20:29:04 +0000
+
 ruby-mysql2 (0.4.3-1) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/series b/debian/patches/series
index df136f1..cc2684e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+type-year-size.patch
 remove_rpath_compilation_flag.patch
 remove_rubygems_from_examples.patch
 skip-problematic-tests.patch
diff --git a/debian/patches/type-year-size.patch b/debian/patches/type-year-size.patch
new file mode 100644
index 0000000..38a8dca
--- /dev/null
+++ b/debian/patches/type-year-size.patch
@@ -0,0 +1,39 @@
+Description: Fix conversion of YEAR type
+ libmysqlclient treats YEAR as a short int, but this package thought it was an int4.
+Author: Christian Hofstaedtler <zeha at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2016-02-27
+---
+--- a/ext/mysql2/result.c
++++ b/ext/mysql2/result.c
+@@ -278,12 +278,12 @@ static void rb_mysql_result_alloc_result
+         wrapper->result_buffers[i].buffer_length = sizeof(signed char);
+         break;
+       case MYSQL_TYPE_SHORT:        // short int
++      case MYSQL_TYPE_YEAR:         // short int
+         wrapper->result_buffers[i].buffer = xcalloc(1, sizeof(short int));
+         wrapper->result_buffers[i].buffer_length = sizeof(short int);
+         break;
+       case MYSQL_TYPE_INT24:        // int
+       case MYSQL_TYPE_LONG:         // int
+-      case MYSQL_TYPE_YEAR:         // int
+         wrapper->result_buffers[i].buffer = xcalloc(1, sizeof(int));
+         wrapper->result_buffers[i].buffer_length = sizeof(int);
+         break;
+@@ -406,6 +406,7 @@ static VALUE rb_mysql_result_fetch_row_s
+           }
+           break;
+         case MYSQL_TYPE_SHORT:        // short int
++        case MYSQL_TYPE_YEAR:         // short int
+           if (result_buffer->is_unsigned) {
+             val = UINT2NUM(*((unsigned short int*)result_buffer->buffer));
+           } else  {
+@@ -414,7 +415,6 @@ static VALUE rb_mysql_result_fetch_row_s
+           break;
+         case MYSQL_TYPE_INT24:        // int
+         case MYSQL_TYPE_LONG:         // int
+-        case MYSQL_TYPE_YEAR:         // int
+           if (result_buffer->is_unsigned) {
+             val = UINT2NUM(*((unsigned int*)result_buffer->buffer));
+           } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mysql2.git



More information about the Pkg-ruby-extras-commits mailing list