gopsutil icon indicating copy to clipboard operation
gopsutil copied to clipboard

Initial support for NetBSD

Open khorben opened this issue 2 years ago • 3 comments

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.

khorben avatar Oct 14 '22 00:10 khorben

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

shirou avatar Oct 14 '22 13:10 shirou

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.

khorben avatar Oct 14 '22 15:10 khorben

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.

khorben avatar Oct 16 '22 18:10 khorben

Closing, superseded by #1530 which is partially based off this PR, thanks @khorben.

Lomanic avatar May 10 '24 00:05 Lomanic