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

Use non-lfs64 api for getrlimit()/setrlimit() wrapper functions #18

Closed
wants to merge 0 commits into from
Closed

Use non-lfs64 api for getrlimit()/setrlimit() wrapper functions #18

wants to merge 0 commits into from

Conversation

LinuxUserGD
Copy link
Contributor

@LinuxUserGD LinuxUserGD commented Sep 18, 2023

According to https://docs.rs/libc/latest/libc/type.rlim_t.html, the type of libc::rlim_t is always u64, therefore rlimit and rlimit64 structs should be identical.
On 32-bit glibc without -D_FILE_OFFSET_BITS=64, rlim_t is converted to a 32-bit unsigned long while musl uses 64-bit types for syscalls by default.

Fixes #17 for rust libc<0.2.147 (lfs64 aliases have been added in rust-lang/libc#2935)
Alternative to #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure on musl 1.2.4 (lfs64 symbols)
2 participants