Skip to content

Commit

Permalink
Merge pull request #78 from djberg96/revert-73-i686-64-bit-offset-fix
Browse files Browse the repository at this point in the history
Revert "Add padding on 32 bit statvfs with 64 bit offsets"
  • Loading branch information
djberg96 authored Oct 4, 2024
2 parents 16147e0 + 2628132 commit 58c4182
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/sys/unix/sys/filesystem/structs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ def self.linux64?
:f_spare, [:int, 5]
)
else
require 'mkmf-lite'
extend Mkmf::Lite
layout_array = [
layout(
:f_bsize, :ulong,
:f_frsize, :ulong,
:f_blocks, :uint64,
Expand All @@ -243,16 +241,7 @@ def self.linux64?
:f_namemax, :ulong,
:f_type, :uint,
:f_spare, [:int, 5]
]

# Check if we need to add __f_unused
f_unused_bytes = 2 * check_sizeof('int') - check_sizeof('long')
if f_unused_bytes > 0
# For Big Endian, this should be inserted at -9
layout_array.insert(-7, :__f_unused, [:char, f_unused_bytes])
end

layout(*layout_array)
)
end
end

Expand Down

0 comments on commit 58c4182

Please sign in to comment.