Closed cuviper closed 6 years ago
I'm sort of curious, how does C manage this sort of issue? Does every library end up having similar patches along these lines?
In any case looks good, thanks! Would you like a version bump as well?
The "fun" part is that the symlink lutimes
fallback doesn't actually work. On newer systems, lutimes
is implemented on top of utimensat
anyway. On older systems like RHEL5, which have the lutimes
symbol but no utimensat
, it's just an ENOSYS
stub. 🤷♂️
The fallback does work for set_file_times
though.
how does C manage this sort of issue?
You can stick to old syscalls only, implement an ENOSYS fallback like this, or just raise your bar of supported kernels. You'll often see these kind of messes in autoconf'ed #if HAVE_FOO
blocks.
A new release would be great, thanks!
Hm ok, fascinating! I'm sort of glad I don't write C, I'd never remember all this...
In any case, 0.1.15 should be published now.
Even when libc has
utimensat
, the kernel may returnENOSYS
, and then we'll need to use theutimes
fallback instead.