-
Notifications
You must be signed in to change notification settings - Fork 675
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 ENOTSUP to Linux and Android #969
Conversation
I have no idea if this will work. Created the PR to trigger a CI build and seeing what happens. |
I'm not sure about this PR. What portability advantages does |
I had some code that returned (I changed my code to |
Just getting back to this because of bazelbuild/sandboxfs#72. Note how my "fix" to use |
Ok, but let's not duplicate libc's job. Instead of defining |
While ENOTSUP is defined as equal to EOPNOTSUPP on these platforms, exposing the ENOTSUP symbol (as libc does) allows for writing portable code that may want to reference this error code.
OK, so I'm not sure how you'd like to achieve this. First, the changes I made are all within a chunk of code that is gated by a Second, I tried adding And lastly, note that the line I'm adding exists next to definitions for |
I didn't realize that Rust enforced a uniqueness constraint for enums. Ok, let's commit this then. bors r+ |
969: Add ENOTSUP to Linux and Android r=asomers a=jmmv While ENOTSUP is defined as equal to EOPNOTSUPP on these platforms, exposing the ENOTSUP symbol (as libc does) allows for writing portable code that may want to reference this error code. Co-authored-by: Julio Merino <jmmv@google.com>
Build succeeded
|
While ENOTSUP is defined as equal to EOPNOTSUPP on these platforms,
exposing the ENOTSUP symbol (as libc does) allows for writing portable
code that may want to reference this error code.