Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add padding on 32 bit statvfs with 64 bit offsets" #78

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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