openbsd-ports/lang/rubinius/patches/patch-lib_zlib_rb_ffi
jeremy be40d18596 Fix zlib ffi driver on 32-bit big endian platforms. Fixes gem
installation on macppc.  Thanks to ajacoutot@ for access to a macppc
machine.

OK ajacoutot@, jasper@
2011-01-21 16:36:53 +00:00

24 lines
813 B
Plaintext

$OpenBSD: patch-lib_zlib_rb_ffi,v 1.1 2011/01/21 16:36:53 jeremy Exp $
OpenBSD uses off_t instead of unsigned long for the total_in and
total_out struct members, so it works on files >4GB. Rubinius has
harcoded ulong instead of checking, as ulong is what most other
OSes use.
--- lib/zlib.rb.ffi.orig Thu Jan 20 11:45:11 2011
+++ lib/zlib.rb.ffi Thu Jan 20 11:45:15 2011
@@ -245,11 +245,11 @@ module Zlib
s.name "struct z_stream_s"
s.field :next_in, :pointer
s.field :avail_in, :uint
- s.field :total_in, :ulong
+ s.field :total_in, :off_t
s.field :next_out, :pointer
s.field :avail_out, :uint
- s.field :total_out, :ulong
+ s.field :total_out, :off_t
s.field :msg, :string
s.field :state, :pointer