-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add flock64 to linux_like platforms #1561
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
8cd04dc
to
0da3a5f
Compare
@bors: r+ |
📌 Commit 0da3a5f has been approved by |
If this gets merged before my sparc PR, I should probably add flock64 to sparc as well. |
Add flock64 to linux_like platforms Hi, I'm not sure about what to make of the ifdef in glibc `__USE_LARGEFILE64` that covers it. but I copied the impl from glibc's headers. everything is the same except for sparc which has a reserved short int. and in musl it's just `#define flock64 flock`
💔 Test failed - status-azure |
From the error messages it appears that the type is defined differently on different targets. You need to fix those. |
First of all awesome test suite :) I need to read how it works. Second, seems that the problem is the musl targets, which makes sense. i'll fix it. |
Notice that there are generic files for |
the glibc once are fine (they match glibc correctly and pass the tests) on the other hand, musl have https://git.musl-libc.org/cgit/musl/tree/include/fcntl.h#n202 |
The test framework always defines |
Be careful though as flock64 is different on sparc* targets so you need arch-specific definitions.
|
I know, did that already, the weird thing is actually musl targets which should be flock==flock64 |
@gnzlbg Ok, I got it down to this example: https://ideone.com/rgk7OZ
it should be The question is why this happens |
Update, that's definitely because I defined Should I replace the typedef with a duplicate struct? |
There are methods in ctest to configure how to name the type aliases, you can use |
1271a73
to
dd0e036
Compare
dd0e036
to
66529ed
Compare
Co-Authored-By: gnzlbg <gnzlbg@users.noreply.github.com>
Thanks! @bors: r+ |
📌 Commit 490e073 has been approved by |
Add flock64 to linux_like platforms Hi, I'm not sure about what to make of the ifdef in glibc `__USE_LARGEFILE64` that covers it. but I copied the impl from glibc's headers. everything is the same except for sparc which has a reserved short int. and in musl it's just `#define flock64 flock`
☀️ Test successful - checks-cirrus-freebsd-10, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure |
Oh, is the CI working again? I just re-pushed my PR. |
Hi,
I'm not sure about what to make of the ifdef in glibc
__USE_LARGEFILE64
that covers it.but I copied the impl from glibc's headers.
everything is the same except for sparc which has a reserved short int.
and in musl it's just
#define flock64 flock