[DRE-commits] [ruby-ffi-rzmq-core] 01/02: add patch to fix memory allocation message for libzmq 4.1+

Cédric Boutillier boutil at moszumanska.debian.org
Wed Feb 24 22:21:42 UTC 2016


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

boutil pushed a commit to branch master
in repository ruby-ffi-rzmq-core.

commit 616b2676dd5b05fd47df2b525419fe75e18e09ce
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Feb 24 23:09:16 2016 +0100

    add patch to fix memory allocation message for libzmq 4.1+
---
 .../0002-correct-mem-alloc-for-libzmq-4.1.patch    | 51 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 52 insertions(+)

diff --git a/debian/patches/0002-correct-mem-alloc-for-libzmq-4.1.patch b/debian/patches/0002-correct-mem-alloc-for-libzmq-4.1.patch
new file mode 100644
index 0000000..806193c
--- /dev/null
+++ b/debian/patches/0002-correct-mem-alloc-for-libzmq-4.1.patch
@@ -0,0 +1,51 @@
+Description: Correct the message mem allocation for libzmq 4.1+
+Origin: https://patch-diff.githubusercontent.com/raw/chuckremes/ffi-rzmq-core/pull/11.patch
+Author: Joel Hahn <joel.hahn at roosterfive.com>
+Reviewed-by: Cédric Boutillier <boutil at debian.org>
+Last-Modified: 2016-01-04
+
+---
+ lib/ffi-rzmq-core/structures.rb | 19 +++++++------------
+ spec/structures_spec.rb         |  2 +-
+ 2 files changed, 8 insertions(+), 13 deletions(-)
+
+--- a/lib/ffi-rzmq-core/structures.rb
++++ b/lib/ffi-rzmq-core/structures.rb
+@@ -3,19 +3,14 @@
+   # Used for casting pointers back to the msg_t struct
+   #
+   class Message < FFI::Struct
+-    layout :content,  :pointer,
+-      :flags,    :uint8,
+-      :vsm_size, :uint8,
+-      :vsm_data, [:uint8, 30]
+-  end
+-  
+-  if LibZMQ.version[:major] >= 4 && LibZMQ.version[:minor] > 0
+-    
+-    # zmq_msg_t was expanded to 64 bytes as of version 4.1.0
+-    class Message < FFI::Struct
+-      layout :content, :ulong_long
++    if LibZMQ.version[:major] >= 4 && LibZMQ.version[:minor] > 0
++      layout :content,  [:uint8, 64]
++    else
++      layout :content,  :pointer,
++             :flags,    :uint8,
++             :vsm_size, :uint8,
++             :vsm_data, [:uint8, 30]
+     end
+-    
+   end
+ 
+ 
+--- a/spec/structures_spec.rb
++++ b/spec/structures_spec.rb
+@@ -5,7 +5,7 @@
+   if LibZMQ.version4? && LibZMQ.version[:minor] > 0
+ 
+     it "the msg_t struct wrapped in Message is 64 bytes" do
+-      LibZMQ::Message.size == 64
++      expect(LibZMQ::Message.size).to be == 64
+     end
+     
+   else
diff --git a/debian/patches/series b/debian/patches/series
index e1c38c4..3ddbad3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-load-so-from-libzmq3-or-libzmq1.patch
+0002-correct-mem-alloc-for-libzmq-4.1.patch

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



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