go: Fix incompatibility of gopsutil dependency with macOS
We have received a report that users of macOS are seeing a lot of compiler warnings complaining about TARGET_OS_MAC being undefined: # github.com/shirou/gopsutil/v3/cpu .../pkg/mod/github.com/shirou/gopsutil/v3@v3.21.2/cpu/cpu_darwin_cgo.go:13:5: warning: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_] This warnings is caused by f47b8851318d ([clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver, 2020-07-06) in the Clang compiler, which causes it to emit warnings by default whenever the compiler sees an undefined `TARGET_OS_` macro in the Darwin driver. And this change is completely sensible, as the macro being undefined would mean that the code that the platform-dependent code is not enabled as it ought to be. So the actual bug is in the gopsutil package, which forgot to include the `<TargetConditionals.h>` header. This was fixed in gopsutil v3.21.3, but we are still pulling in v3.21.2. Fix this bug by upgrading to the most recent bug release of the v3.21 release train, which is v3.21.12. Changelog: fixed
Please register or sign in to comment