Skip to content

kernel_tainted: use linux build tag instead of !windows - #847

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
arunsrini3082:fix-kernel-tainted-build-tag
Jul 17, 2026
Merged

kernel_tainted: use linux build tag instead of !windows#847
SuperQ merged 1 commit into
prometheus:masterfrom
arunsrini3082:fix-kernel-tainted-build-tag

Conversation

@arunsrini3082

Copy link
Copy Markdown
Contributor

util.SysReadUintFromFile is defined in internal/util/sysreadfile.go
with a //go:build linux constraint. The previous !windows tag caused
build failures on OpenBSD and other non-Linux, non-Windows platforms
(seen in node_exporter crossbuild CI).

/proc/sys/kernel/tainted is Linux-specific, so linux is the correct
build constraint.

Fixes: #844 follow-up

util.SysReadUintFromFile is defined in internal/util/sysreadfile.go
which has a //go:build linux constraint. Using !windows caused build
failures on OpenBSD and other non-Linux, non-Windows platforms.

/proc/sys/kernel/tainted is Linux-specific, so linux is the correct
build tag.

Signed-off-by: Arun Srinivasan <arun.srinivasan@flipkart.com>
Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@SuperQ
SuperQ merged commit 0cd1823 into prometheus:master Jul 17, 2026
7 checks passed
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