-
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 SEEK_DATA/SEEK_HOLE constants #319
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! Looks like these constants may not exist yet on musl though? |
Yes, that would appear to be the case. Wasn't sure, so I figured I would let CI let me know. I'll add an ignore in the tests for that constant for musl (I believe that is the best way to handle). |
Ah the preferred method is actually to duplicate these constants down to the level where they're defined (e.g. android + non-musl linux) rather than |
I can do this, although it doesn't seem strictly necessary (or beneficial) and makes usage of the constants in downstream crates more complicated as instead of worrying about the OS we need to be concerned with the libc implementation (which is fine in some cases, but unnecessary here). These constants are defined by the kernel and musl lets the kernel accept/reject the values for calls where they are used (e.g. lseek). |
Ah yeah we just typically try to stick to the musl headers, regardless of whether they just forward it to the kernel or not |
Sure, I'll take a look at fixing musl as well then. |
Relates to nix-rust/nix#377. These constants are only available in systems running the Linux kernel and are not defined in musl libc (yet). Signed-off-by: Paul Osborne <osbpau@gmail.com>
30befca
to
45448fb
Compare
Ok, Travis is happy after amending the commit to have the constants live under |
Add SEEK_DATA/SEEK_HOLE constants Relates to nix-rust/nix#377. These constants are only available in systems running the Linux kernel.
☀️ Test successful - status-appveyor, travis |
Support isn't quite in nightly to make this work yet, but using a local build this gets everything passing again! This also implements native verification that we have the attribute in the right place
Relates to nix-rust/nix#377. These constants
are only available in systems running the Linux kernel.