GuillaumeGomez / sysinfo

Cross-platform library to fetch system information
MIT License
2.19k stars 321 forks source link

Deal with libc 0.2.165's removal of array size hacks #1393

Closed dtolnay closed 6 days ago

dtolnay commented 1 week ago

Closes https://github.com/GuillaumeGomez/sysinfo/issues/1392.

Libc changed the representation of libc::vnode_info_path::vip_path.

dtolnay commented 1 week ago

If necessary, we could support both by using a trait that is implemented for both [[c_char; M]; N] and [c_char; N]. But just supporting the newest seems fine — unless yet another libc version reverts the change.

dtolnay commented 1 week ago

I found a better fix that will work even if libc reverts the change.

GuillaumeGomez commented 6 days ago

Thanks!

tgross35 commented 6 days ago

Changing the private fields wasn't intentional and seems to have a lot of fallout unfortunately. So we are going to revert, I'm not sure if that affects things here (thanks for working around it so quickly)

GuillaumeGomez commented 6 days ago

@tgross35 We depend on 0.2.165, which was yanked. So it'd be nice if we had a 0.2.166 release.

tgross35 commented 6 days ago

That should be out very soon https://github.com/rust-lang/libc/pull/4147

GuillaumeGomez commented 6 days ago

Awesome, thanks!

tgross35 commented 6 days ago

The release just finished https://github.com/rust-lang/libc/releases/tag/0.2.166