kahing / catfs

Cache AnyThing filesystem written in Rust
Apache License 2.0
842 stars 54 forks source link

libc::ENOATTR deprecation #52

Open gaul opened 3 years ago

gaul commented 3 years ago

The newer libc warns:

warning: use of deprecated constant `libc::ENOATTR`: ENOATTR is not available on Linux; use ENODATA instead
   --> src/catfs/file.rs:274:61
    |
274 |                 if my_errno != libc::ENODATA && my_errno != libc::ENOATTR {
    |                                                             ^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

I added this to handle macOS behavior. Some context: https://github.com/rust-lang/libc/issues/1356#issuecomment-494827003