From bbcbb10e7527f787908009178229858f0e60cbda Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 10 May 2017 12:17:51 +0100 Subject: [PATCH] Use #bytesize instead of #size when measuring the length of our packed integer. --- lib/linux/c_struct.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linux/c_struct.rb b/lib/linux/c_struct.rb index 26877bb..a33a860 100644 --- a/lib/linux/c_struct.rb +++ b/lib/linux/c_struct.rb @@ -83,7 +83,7 @@ class CStruct require 'linux/c_struct_sizeof_size_t.rb' rescue LoadError warn "netlinkrb: Assuming size_t is a long unsigned int." if $DEBUG - SIZEOF_SIZE_T = [0].pack("L_").size + SIZEOF_SIZE_T = [0].pack("L_").bytesize end define_type :size_t,