-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix FreeBSD compiler error #377
Fix FreeBSD compiler error #377
Conversation
Thank you for the pull request! This is once again a result of my last minute refactoring before the release. 🙃 I think that |
7495397
to
395360a
Compare
On FreeBSD 14, uname -s returns the name of the operating system. Whereas I believe the intention was to have a similar behavior to the OpenBSD module implementation, and use the -r flag which does also return the current release level of the kernel: "14.0-RELEASE".
395360a
to
3147a61
Compare
Good catch, you're absolutely right 👀 👍🏻 I've adjusted the PR to reflect the changes suggested in your comment indeed 🙇🏻 |
I would appreciate a release with this. This has caused the FreeBSD-build for the recent starship release to fail, and I may need to do another patch-up release soon, where it would be nice to have FreeBSD-builds again. |
@davidkna I have published the 3.8.2 version and yanked both 3.8.0 and 3.8.1. Sorry for the inconvenience! |
Thanks! |
Thank you @stanislav-tkach much appreciated 🙇🏻 |
Hi @stanislav-tkach 👋🏻
While putting together a FreeBSD port for one of my rust crates, I encountered compilation errors from the
os_info
crate. Both with the OS' (FreeBSD 14.0) rust pkg, embedding the rust compiler version 1.72, and with the rustup default stable compiler version 1.76.This Pull Request applies the fix recommended by the compiler and replaces the
-s
flag passed into theuname
command by the-r
flag, which does return the release number on FreeBSD (just like on OpenBSD), as opposed to-s
which only returns the name of the os "FreeBSD". I assumed this wasn't intentional, but if it was, let me know, and I'll happily drop the change from the PR.For reference, here's the compiler error I was encountering:
Let me know what you think and if you'd prefer any done differently 👍🏻
Thank you 🙇🏻