Skip to content
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

Add missing TargetConditionals.h include, closes #976 #1042

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Mar 1, 2021

No description provided.

@bobrik
Copy link
Contributor Author

bobrik commented Mar 1, 2021

I'm fairly certain that the test failure on macos 10.12 (EOL 2019-11-30) is not due to this change:

--- FAIL: TestNetIOCountersAll (0.01s)
    net_test.go:91: invalid sum value: 127622, 127623
FAIL
FAIL	github.com/shirou/gopsutil/net	0.130s
ok  	github.com/shirou/gopsutil/process	5.232s
FAIL
Error: Process completed with exit code 1.

@shirou
Copy link
Owner

shirou commented Mar 17, 2021

I don't have a Mac but it seems TargetConditionals.h has TARGET_OS_MAC , so it might fix the issue. I think TargetConditionals.h is provided Apple and all Mac version includes it.

Thank you for your contribution!

@shirou shirou merged commit 2623881 into shirou:master Mar 17, 2021
aashishkapur pushed a commit to aashishkapur/lightstep-tracer-go that referenced this pull request May 19, 2022
I'm getting the following warning when building a package depending on lightstep-tracer-go:
../../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_]

We can fix this by upgrading gopsutil, see shirou/gopsutil#1042
aashishkapur pushed a commit to aashishkapur/lightstep-tracer-go that referenced this pull request May 20, 2022
I'm getting the following warning when building a package depending on lightstep-tracer-go:
../../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_]

We can fix this by upgrading gopsutil, see shirou/gopsutil#1042
codeboten pushed a commit to lightstep/lightstep-tracer-go that referenced this pull request May 31, 2022
I'm getting the following warning when building a package depending on lightstep-tracer-go:
../../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_]

We can fix this by upgrading gopsutil, see shirou/gopsutil#1042
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants