gopsutil
gopsutil copied to clipboard
Initial support for NetBSD
These two commits will hopefully help bring support for NetBSD to the project. I have not been able to verify if these changes are correct yet ("go test" did not yield anything apparently useful). Please review before merging, and do so only if you feel like it is not expected to break anything new.
For these changes, I have simply copied the OpenBSD files as NetBSD, as the two systems are usually very close to one another. As such I think at least some things should work once the module is confirmed to build.
Thank you for your contribution. I have not checked all of the files, but if these netbsd files are just copied from openbsd, how about simply add netbsd
to the build tag in openbsd files, like this?
//go:build openbsd netbsd
It's a good idea, it might be a bit misleading though.
Let me try to actually test and verify if the changes work over the week-end.
For the cpu
part, some changes were required for the code to work on NetBSD.
I will continue with the other parts of the code ASAP.
Closing, superseded by #1530 which is partially based off this PR, thanks @khorben.