musl: introduce musl_stat_timespec cfg for struct stat#4942
musl: introduce musl_stat_timespec cfg for struct stat#4942heiher wants to merge 1 commit intorust-lang:mainfrom
Conversation
Some musl targets use out-of-line timespec fields in struct stat. This property is independent of the `musl_v1_2_3` switch. Add a new `musl_stat_timespec` cfg and use it to control the presence of inline time fields in musl struct stat definitions, avoiding incorrect API assumptions based on musl version alone.
|
Thanks for the fix, sorry that this broke. Quite honestly I'm feeling like we should just delete the That's also nicer for our users who won't need to do a different config for musl and glibc. Cc @xbjfk for your thoughts as you authored the commit in question. |
|
I would personally push for using
I personally think the best path forward would be to revert 55fa65b so that people can try the new experimental musl with less breaking changes (and fixing loongarch) and reintroduce the name change without a feature gate for all platforms in the 1.0 branch only for the reasons listed above (virtually every UNIX platform supported by libc uses timespec). IIRC this was changed with time64 changes the because having conditional definitions for the padding was a bit unwieldy. Will look into making a PR for this. |
Description
Some musl targets use out-of-line timespec fields in struct stat. This property is independent of the
musl_v1_2_3switch.Add a new
musl_stat_timespeccfg and use it to control the presence of inline time fields in musl struct stat definitions, avoiding incorrect API assumptions based on musl version alone.Sources
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI