Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Fix statx_timestamp types/field names #1

Merged
merged 3 commits into from
Oct 3, 2019
Merged

Conversation

ariasuni
Copy link
Contributor

@ariasuni ariasuni commented Oct 2, 2019

  • Use more recent and not yanked version of memoffset
  • Typo where tv_nsec was named tc_nsec
  • Use same types as libc (except for statx_timestamp.__reserved which stays an i32 — like in Linux headers — instead of an [i32; 1] like the glibc)

I implemented getting created time on Linux in exa with your crate (thanks!), I’ll just wait for this PR to be merged so I can use the correct field name right away. :)

@oxalica
Copy link
Owner

oxalica commented Oct 3, 2019

Thanks!

But since libc has already statx function ans structs now, is this crate still needed?

@ariasuni
Copy link
Contributor Author

ariasuni commented Oct 3, 2019

Right I guess I can do the syscall with libc too, I’ll check that.

@oxalica oxalica merged commit 4d6e5f4 into oxalica:master Oct 3, 2019
@oxalica
Copy link
Owner

oxalica commented Oct 3, 2019

@ariasuni

I make this crate compatible to libc 0.2.3 , as fallback for system with statx support but having an old version of glibc (libc::statx will cause a link error).

I think this may still be helpful for std.

@ariasuni ariasuni deleted the fix-typo branch October 3, 2019 13:02
@ariasuni
Copy link
Contributor Author

ariasuni commented Oct 3, 2019

The standard library is using libc, too. The problem is that they made the very dumb choice of exposing the underlying type by creating the MetadataExt.as_raw_stat() function, so we’re stuck with not being able to get the creation time until next epoch if that’s something they allow to do I guess.

By the way, my exa PR is here (since I mentioned it but didn’t put a link).

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

Successfully merging this pull request may close these issues.

2 participants