prometheus / procfs

procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
Apache License 2.0
754 stars 311 forks source link

Fix build tags for isRealProc function #560

Closed dswarbrick closed 9 months ago

dswarbrick commented 10 months ago

Only aix, darwin, dragonfly freebsd and linux GOOS have a Type member in their syscall.Statfs_t struct. However, since the isRealProc compares that Type to a magic number (PROC_SUPER_MAGIC, 0x9fa0) which is only relevant to Linux (and possibly FreeBSD with Linux compatibility), adjust build tags accordingly.

This drops the previous nostatfs build tag workaround, since the "tamago" GOOS for which it was originally added won't match the updated build tags.

Fixes: #554.