Skip to content

Conversation

@adrianosela
Copy link
Contributor

fs: syscall.Statfs_t object doesn't have a Type field on Windows

Fixes build for GOOS=windows (#527)

This PR extends the solution from #523 to include windows in the list of OSes for which the syscall.Statfs_t object does not have a Type field

Testing:

Before:

✔ ~/go/src/github.com/adrianosela/procfs [master|✔]
11:22 $ GOOS=windows GOARCH=amd64 go build
# github.com/prometheus/procfs
./fs_statfs_type.go:25:18: undefined: syscall.Statfs_t
./fs_statfs_type.go:26:17: undefined: syscall.Statfs

After:

✔ ~/go/src/github.com/adrianosela/procfs [master|✔]
11:24 $ GOOS=windows GOARCH=amd64 go build
✔ ~/go/src/github.com/adrianosela/procfs [master|✔]

Signed-off-by: Adriano Sela Aviles <adriano.selaviles@gmail.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

@SuperQ SuperQ merged commit 5d2473f into prometheus:master May 28, 2023
SuperQ pushed a commit that referenced this pull request May 28, 2023
Signed-off-by: Adriano Sela Aviles <adriano.selaviles@gmail.com>
SuperQ added a commit that referenced this pull request May 28, 2023
Signed-off-by: Adriano Sela Aviles <adriano.selaviles@gmail.com>
Co-authored-by: Adriano Sela Aviles <adriano.selaviles@gmail.com>
@adrianosela
Copy link
Contributor Author

Cross posting from: #529

Hey @SuperQ , would be good to go over the list here https://github.com/golang/go/blob/master/src/go/build/syslist.go and deal with all of the OSes.... there's a list of unix-like OSses there too, so maybe worth just going off of that?

jritter pushed a commit to jritter/procfs that referenced this pull request Jul 15, 2024
Signed-off-by: Adriano Sela Aviles <adriano.selaviles@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants