rust-lang / libc

Raw bindings to platform APIs for Rust
https://docs.rs/libc
Apache License 2.0
2.02k stars 1.01k forks source link

Add structures for freebsd #3756

Open Awoonyaa opened 2 weeks ago

rustbot commented 2 weeks ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

arrowd commented 1 week ago

Some context: On FreeBSD the evdev headers are not part of the base system, but come from a package named evdev-proto. It seems this package should be installed to make this PR compile.

@devnexen You did some FreeBSD PRs already, could you please look at this one too?

devnexen commented 1 week ago

Some context: On FreeBSD the evdev headers are not part of the base system, but come from a package named evdev-proto. It seems this package should be installed to make this PR compile.

Just quick response here: by definition if it is not part of the system thus has no place in this crate, e.g. libutil is still part of builtin libraries. my 2 cents :)

arrowd commented 1 week ago

Yes, but on Linux these data types are part of libc. Because of this, the consumers of this library that are using these types will fail to compile on FreeBSD. This is the case for the new release of https://github.com/mqudsi/syngesture

I think that putting these types here is the most correct solution, but I know nothing of Rust ecosystem.

devnexen commented 1 week ago

I get it, but Linux is Linux. However though, nothing is stopping you define those types in the requested project (or to publish a crate dedicated to those sort of things ?). But hey, I m not the maintainer of libc :) I do not get to decide.

arrowd commented 1 week ago

nothing is stopping you define those types in the requested project

This would require patching for each project that depends on these types in libc.

or to publish a crate dedicated to those sort of things ?

This would probably require patching too, although much less? Maybe it is a way to go then?

devnexen commented 1 week ago

Regardless, to make CI work here you would need to add the related dependency. CI at the moment only install what necessaty, it appears, for rustup nothing else. The decision to merge it or not is more @JohnTitor call :)

devnexen commented 13 hours ago

I think you need to declare the appropriate evdev-proto header in libc-test/build.rs in the freebsd's list.