Closed tomaka closed 5 years ago
Thanks!
I'm not sure what to do about the test failures, but getting things compiling seems like a good first start
This breaks on FreeBSD 11:
error[E0425]: cannot find value `utimensat` in module `libc`
--> src/unix/utimensat.rs:8:45
|
8 | super::utimensat(p, atime, mtime, libc::utimensat, 0)
| ^^^^^^^^^ did you mean `utimes`?
When I remote the cfg target freebsd from unix/mod and let it use utimes, it works fine
Oh dear sorry about that! Want to send a PR to fix FreeBSD?
Yes, I will do that tomorrow. I will look into the problem because it does seem that utimesnsat is prevered over utimes in freebsd 10.3+
On Sat, 10 Nov 2018, 18:23 Alex Crichton <notifications@github.com wrote:
Oh dear sorry about that! Want to send a PR to fix FreeBSD?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alexcrichton/filetime/pull/31#issuecomment-437600407, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAtjJPvehnGqlzYSARxPo2LKf-m4yK4ks5utwt3gaJpZM4YNGrX .
I checked, the latest release of rust libc (0.2.43) doesn't have the utimensat call for freebsd. It's in the master branch but not in the release version. I can patch out the cfg=freebsd and create a pull request, but the real solution would be for libc to create a 0.2.44 version.
Ok!
My primary motivation is to fix #24 However this also fixes #29, but I didn't test it.
On emscripten
utimes
is just a wrapper on top ofutimensat
, which is why my change makes sense: https://github.com/kripken/emscripten/blob/6e4b98636618989bcd99308391e51aa1b81f4c61/system/lib/libc/musl/src/linux/utimes.c#L9 https://github.com/kripken/emscripten/blob/6e4b98636618989bcd99308391e51aa1b81f4c61/system/lib/libc/musl/src/stat/futimesat.c#L20However the tests don't work because:
flags
have to be 0, soset_symlink_file_times
doesn't work: https://github.com/kripken/emscripten/blob/52ff847187ee30fba48d611e64b5d10e2498fe0f/src/library_syscall.js#L1260